public long UserOfficeIdSession
{
get { return Convert.ToInt64(Session["UserOfficeId"]); }
set { Session["UserOfficeId"] = value; }
}
public long RoleIdSession
{
get { return Convert.ToInt64(Session["RoleId"]); }
set { Session["RoleId"] = value; }
}
public string ApplicationNoSession
{
get
{
object o = Session["ApplicationNo"];
return (o == null) ? String.Empty : (string)o;
}
set
{
Session["ApplicationNo"] = value;
}
}
public string RCNoSession
{
get
{
object o = Session["RCNo"];
return (o == null) ? String.Empty : (string)o;
}
set
{
Session["RCNo"] = value;
}
}
public int ApplicationTypeIdSession
{
get { return Convert.ToInt32(Session["ApplicationTypeId"]); }
set { Session["ApplicationTypeId"] = value; }
}
public int StatusSession
{
get { return Convert.ToInt32(Session["Status"]); }
set { Session["Status"] = value; }
}
public long BranchOfficeIdSession
{
get { return Convert.ToInt64(Session["BranchOfficeId"]); }
set { Session["BranchOfficeId"] = value; }
}
public int ZoneIdSession
{
get { return Convert.ToInt32(Session["ZoneId"]); }
set { Session["ZoneId"] = value; }
}
page load function
--------------------
if (!string.IsNullOrEmpty(ApplicationNoSession))
{
txtApplicationNo.Text = ApplicationNoSession;
}
if (!string.IsNullOrEmpty(RCNoSession))
{
txtRcNo.Text = RCNoSession;
}
if (ApplicationTypeIdSession > 0)
{
ddlTypeOfApplication.SelectedValue = ApplicationTypeIdSession.ToString();
}
if (StatusSession > 0)
{
ddlStatus.SelectedValue = StatusSession.ToString();
}
if (BranchOfficeIdSession > 0)
{
ddlBranch.SelectedValue = BranchOfficeIdSession.ToString();
}
if (ZoneIdSession > 0)
{
ddlZones.SelectedValue = ZoneIdSession.ToString();
}
button search click
protected void btnSearch_Click(object sender, EventArgs e)
{
ApplicationNoSession = txtApplicationNo.Text;
RCNoSession = txtRcNo.Text;
ApplicationTypeIdSession = int.Parse(ddlTypeOfApplication.SelectedValue);
StatusSession = int.Parse(ddlStatus.SelectedValue);
BranchOfficeIdSession = long.Parse(ddlBranch.SelectedValue);
ZoneIdSession = int.Parse(ddlZones.SelectedValue);
No comments:
Post a Comment