Exemplo n.º 1
0
        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();
            }
        }
Exemplo n.º 2
0
        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);
                }
            }
        }
Exemplo n.º 3
0
        private void getLastUpdateLack()
        {
            List <stp_get_LastMeterResult> result = DisplayMeterClass.getLastMaster();

            this.RadListView1.DataSource = result;
        }