protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString["li"] != null && Request.QueryString["li"].Trim() != "")
     {
         if (!IsPostBack)
         {
             string strSQL = "", title = "";
             string det1desc = "", det2desc = "";
             string chkCmdText  = "";
             bool   allowExport = false;
             ListSys.gridInit(grid, Request.QueryString["li"], ref title, ref strSQL, conn, ref det1desc, ref det2desc, ref chkCmdText, ref allowExport);
             TitleHeader.Text         = title;
             ViewState["strSQL"]      = strSQL;
             ViewState["det1desc"]    = det1desc;
             ViewState["det2desc"]    = det2desc;
             ViewState["chkCmdText"]  = chkCmdText;
             ViewState["allowExport"] = allowExport;
         }
         ;
         ListSys.gridLoad(grid, (string)ViewState["det1desc"], (string)ViewState["det2desc"]);
         if (ViewState["chkCmdText"] != null && (string)ViewState["chkCmdText"] != "")
         {
             grid.Columns[1].Visible = true;
             btnSave.Visible         = true;
             btnSave.Text            = (string)ViewState["chkCmdText"];
         }
         if ((bool)ViewState["allowExport"])
         {
             btnExport.Visible = true;
         }
     }
 }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["li"] != null && Request.QueryString["li"].Trim() != "")
            {
                if (!IsPostBack)
                {
                    object[] par = new object[] { Request.QueryString["sts"], Session["ModuleID"], USERID };
                    staticFramework.reff(ddl_Officer, Q_FILLOFFICER, par, conn);

                    string strSQL = "", title = "";
                    ListSys.gridInit(grid, Request.QueryString["li"], ref title, ref strSQL, conn);
                    TitleHeader.Text    = title;
                    ViewState["strSQL"] = strSQL;
                }
                ;
                ListSys.gridLoad(grid);
            }
            btnSave.Attributes.Add("onclick", "if (!cek_mandatory(document.form1)) return false; ");
        }