Hi,
I have an application which controls schedules....
I need locking/checking out logic on these schedules (people schedules).
Does anyone know of any C# components or .Net components that could help in doing this?
I dont want to have these locks in the database itself, I want this to reside in the application/business logic layer.
Thanks in advance,
Person.
Loading
RujutaPosted Nov 24, 2009, 12:20 AM
Here's just a sample code to enable and disable a textbox, you can modify it to lock your schedule. Though this won't reside anywhere within the application but be a client side setting.
protected void Page_Load(object sender, EventArgs e)
{
if (Request.Cookies["State"].Value == "Locked")
{
TextBox1.Enabled = false;
}
else if (Request.Cookies["State"].Value == "Unlock")
{
TextBox1.Enabled = true;
}
}
protected void Button1_Click(object sender, EventArgs e)
{
TextBox1.Enabled = false;
Response.Cookies["State"].Value = "Locked";
}
protected void Button2_Click(object sender, EventArgs e)
{
TextBox1.Enabled = true;
Response.Cookies["State"].Value = "Unlock";
}
Hope this helps