private void LoadControl() { btnNext.Visible = false; btnCancel.Visible = false; btnClose.Visible = false; ServiceCls scls = new ServiceCls(); DataTable dt = new DataTable(); if (Session["empid"] != null) { //Response.Write(Session["empid"].ToString()); dt = scls.getServiceTokenInfo(serviceid, Session["empid"].ToString()); } if (dt.Rows.Count > 0) { //TotalTokens = dt.Rows[0]["TotalTokens"].ToString(); WaitingTokens = dt.Rows[0]["WaitingTokens"].ToString(); //CurrentRunningTokenQNo = dt.Rows[0]["CurrentQNo"].ToString(); CurrentRunningToken = dt.Rows[0]["CurrentToken"].ToString(); //Rooms = dt.Rows[0]["Rooms"].ToString(); //WaitingTime = dt.Rows[0]["ExpectedWaitingTime"].ToString(); //WaitingTime = WaitingTime + " min"; ServiceName = dt.Rows[0]["ServiceName"].ToString(); //UserName = dt.Rows[0]["UserName"].ToString(); //Age = dt.Rows[0]["Age"].ToString(); //Gender = dt.Rows[0]["Gender"].ToString(); //Address = dt.Rows[0]["Address"].ToString(); Session["CurrentRunningToken"] = CurrentRunningToken; if (String.IsNullOrEmpty(CurrentRunningToken)) { CurrentRunningToken = "0"; } if (String.IsNullOrEmpty(WaitingTokens)) { WaitingTokens = "0"; //WaitingTime = "0"; } if (Convert.ToInt32(CurrentRunningToken) > 0) { btnCancel.Visible = true; btnClose.Visible = true; } else { if (Convert.ToInt32(WaitingTokens.ToString()) > 0) { btnNext.Visible = true; } } } }
private void LoadControl() { ServiceCls scls = new ServiceCls(); DataTable dt = new DataTable(); if (Session["empid"] != null) { // Response.Write(Session["empid"].ToString()); dt = scls.getServiceTokenInfo(serviceid, Session["empid"].ToString()); } if (dt.Rows.Count > 0) { TotalTokens = dt.Rows[0]["TotalTokens"].ToString(); WaitingTokens = dt.Rows[0]["WaitingTokens"].ToString(); CurrentRunningTokenQNo = dt.Rows[0]["CurrentQNo"].ToString(); CurrentRunningToken = dt.Rows[0]["CurrentToken"].ToString(); Rooms = dt.Rows[0]["Rooms"].ToString(); WaitingTime = dt.Rows[0]["ExpectedWaitingTime"].ToString(); WaitingTime = WaitingTime + " min"; ServiceName = dt.Rows[0]["ServiceName"].ToString(); UserName = dt.Rows[0]["UserName"].ToString(); Age = dt.Rows[0]["Age"].ToString(); Gender = dt.Rows[0]["Gender"].ToString(); Address = dt.Rows[0]["Address"].ToString(); Session["CurrentRunningToken"] = CurrentRunningToken; if (String.IsNullOrEmpty(CurrentRunningToken)) { CurrentRunningToken = "0"; } if (String.IsNullOrEmpty(WaitingTokens)) { WaitingTokens = "0"; WaitingTime = "0"; } } }