protected void Page_Load(object sender, EventArgs e) { CheckSessionExpire(); if (!Page.IsPostBack) { //ScriptManager.RegisterStartupScript(this.Page, typeof(string), "Resize", "changeWidth.resizeWidth();", true); wrkTable = MRPClass.MRP_Work_Assigned_To_Me(Convert.ToInt32(Session["CreatorKey"])); divWelcome.Visible = false; divWorkAssigned.Visible = false; if (wrkTable.Rows.Count > 0) { divWorkAssigned.Visible = true; BindHomeGrid(Convert.ToInt32(Session["CreatorKey"])); } else { divWelcome.Visible = true; } } }
private void BindHomeGrid(int usrKey) { HomeGrid.DataSource = MRPClass.MRP_Work_Assigned_To_Me(usrKey); HomeGrid.KeyFieldName = "PK"; HomeGrid.DataBind(); }