private void DGV(int p) { Guid LackUniq = new Guid(Request.QueryString["UN"].Trim()); List <stp_get_LastMeter_ByUniqResult> result = DisplayMeterClass.getDetailList(LackUniq); this.RadGrid1.DataSource = result; if (p == 1) { this.RadGrid1.DataBind(); } }
protected void btnLogin_Click(object sender, ImageClickEventArgs e) { if (string.IsNullOrEmpty(this.txtUser.Text.Trim())) { ScriptManager.RegisterStartupScript(Page, Page.GetType(), Guid.NewGuid().ToString(), "alert('Please entry Username !!');", true); this.txtUser.Focus(); return; } if (string.IsNullOrEmpty(this.txtPwd.Text.Trim())) { ScriptManager.RegisterStartupScript(Page, Page.GetType(), Guid.NewGuid().ToString(), "alert('Please entry Password !!');", true); this.txtPwd.Focus(); return; } if (Request.QueryString["UN"] != null) { sec_User result = DisplayMeterClass.ChkUserPwd(this.txtUser.Text.Trim(), this.txtPwd.Text.Trim()); if (result == null) { Session["ERR_"] = "Invalid Username & Password !!"; Session.Timeout = 10; string radalertscript = "CloseAndRebind('navigateToInserted');"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), Guid.NewGuid().ToString(), radalertscript, true); } else { if (Session["USER_"] != null) { Session.Remove("USER_"); } Session["USER_"] = result; Session.Timeout = 100; Session["Uniq_"] = Request.QueryString["UN"].Trim(); string radalertscript = "CloseAndRebind('navigateToInserted');"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), Guid.NewGuid().ToString(), radalertscript, true); } } }
private void getLastUpdateLack() { List <stp_get_LastMeterResult> result = DisplayMeterClass.getLastMaster(); this.RadListView1.DataSource = result; }