Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["li_suffix"] != null)
            {
                li_suffix = Request.QueryString["li_suffix"];
            }

            if (!IsPostBack)
            {
                string strSQL = "", title = "";
                ListSys.gridInit(grid, Request.QueryString["li" + li_suffix], ref title, ref strSQL, conn);

                if (Request.QueryString["atype"] == "RATING")
                {
                    rblsendchange.Items[1].Text = "Excel";
                }

                TitleHeader.Text    = title;
                ViewState["strSQL"] = strSQL;

                link.Attributes.Add("onclick", "javascript:window.open('" +
                                    "../List/UploadVerification.aspx?atype=" + Request.QueryString["atype"] +
                                    "', 'Upload', 'status=no,scrollbars=no,width=500,height=400')");
            }
            foreach (ListItem li in rblsendchange.Items)
            {
                li.Attributes.Add("onclick", "callback(sendtoPanel,'',false)");
            }
        }
Example #2
0
        protected void mainPanel_Callback(object source, DevExpress.Web.CallbackEventArgsBase e)
        {
            NameValueCollection nvcAuto = new NameValueCollection();

            List <object> regno = grid.GetSelectedFieldValues("__KeyField");

            for (int i = 0; i < regno.Count; i++)
            //for (int i = 0; i < selList.Items.Count; i++)
            {
                switch (e.Parameter)
                {
                case "send":
                    string reffnumber = regno[i].ToString();

                    DataTable dt = conn.GetDataTable("select appid from applicant_bkp where reffnumber = @1",
                                                     new object[] { reffnumber }, dbtimeout);
                    string appid = "";
                    for (int k = 0; k < dt.Rows.Count; k++)
                    {
                        appid = dt.Rows[k]["appid"].ToString();
                        conn.ExecReader("exec USP_RESTORE_DATA @1, @2, @3",
                                        new object[] { appid, USERID, "1" }, dbtimeout);
                    }

                    break;
                }
            }

            grid.Selection.UnselectAll();
            ListSys.gridBind(grid, (string)ViewState["strSQL"], UC_ListFilter1.paramFilter, UC_ListFilter1.strFilter, conn);
        }
Example #3
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     System.Collections.Generic.List <object> keyValues = grid.GetSelectedFieldValues(new string[] { grid.KeyFieldName });
     try
     {
         foreach (object key in keyValues)
         {
             string nextstatus = "APV";
             if (Request.QueryString["sts"] == "BMA")
             {
                 nextstatus = "GCC";
             }
             object[] par = new object[] { key, Request.QueryString["sts"], nextstatus, ddl_Officer.SelectedValue, USERID, null };
             conn.ExecNonQuery(SP_ASSIGN, par, dbtimeout);
         }
     }
     catch (Exception ex)
     {
         string errmsg = ex.Message;
         if (errmsg.IndexOf("Last Query") > 0)
         {
             errmsg = errmsg.Substring(0, errmsg.IndexOf("Last Query"));
         }
         DMS.Tools.MyPage.popMessage(this, errmsg);
     }
     grid.Selection.UnselectAll();
     ListSys.gridBind(grid, (string)ViewState["strSQL"], UC_ListFilter1.paramFilter, UC_ListFilter1.strFilter, conn);
 }
Example #4
0
 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;
         }
     }
 }
Example #5
0
 protected void grid_Load(object sender, EventArgs e)
 {
     if (Request.QueryString["li"] != null && Request.QueryString["li"].Trim() != "")
     {
         ListSys.gridBind(grid, (string)ViewState["strSQL"], UC_ListFilter1.paramFilter, UC_ListFilter1.strFilter, conn);
     }
 }
Example #6
0
 protected override void OnInit(EventArgs e)
 {
     base.OnInit(e);
     if (Request.QueryString["li_suffix"] != null)
     {
         li_suffix = Request.QueryString["li_suffix"];
     }
     conn      = new DbConnection((string)Session["ConnString"]);
     clrfilter = ListSys.FilterInit(tblSearch, Request.QueryString["li" + li_suffix], conn, (DevExpress.Web.CallbackEventHandlerBase)dxComboBox_Callback, nvcFilterReff);
     clrButton.Attributes["onclick"] = clrfilter;
 }
Example #7
0
        protected void mainPanel_Callback(object source, DevExpress.Web.CallbackEventArgsBase e)
        {
            SortedList  uploadagency = new SortedList();
            ExcelUpload oExcelUpload = new ExcelUpload(conn);

            object[] param;

            NameValueCollection nvcAuto      = new NameValueCollection();
            NameValueCollection nvcAutoField = new NameValueCollection();
            int    idxAuto         = 0;
            string stage           = Request.QueryString["atype"];
            string assigntrack     = "1.1";
            string assigntrackfrom = "1.0";
            string assigntype      = "1";
            string stagequota      = stage;
            string nexttrack       = "";

            regno = grid.GetSelectedFieldValues("__KeyField");

            if (e.Parameter == "confirm")
            {
                try
                {
                    generate("NONPV");
                }
                catch { }
            }

            //for (int i = 0; i < selList.Items.Count; i++)
            for (int i = 0; i < regno.Count; i++)
            {
                string sendto = SendTo.SelectedValue;

                switch (e.Parameter)
                {
                case "confirm":
                    grid.Selection.UnselectAll();
                    param = new object[] { regno[i].ToString(), "NONPV", USERID };
                    conn.ExecuteNonQuery("EXEC SP_SENDTOAGENCY @1, @2, @3", param, dbtimeout);
                    break;

                case "send":
                    param = new object[] { regno[i].ToString(), sendto, USERID };
                    conn.ExecuteNonQuery("EXEC SP_FLAG_SENDTOAGENCY @1, @2, @3", param, dbtimeout);
                    break;
                }
            }

            ListSys.gridBind(grid, (string)ViewState["strSQL"], UC_ListFilter1.paramFilter, UC_ListFilter1.strFilter, conn);
        }
Example #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["li_suffix"] != null)
            {
                li_suffix = Request.QueryString["li_suffix"];
            }

            if (!IsPostBack)
            {
                initial_reffrential_parameter();
                string strSQL = "", title = "";
                ListSys.gridInit(grid, Request.QueryString["li" + li_suffix], ref title, ref strSQL, conn);
                TitleHeader.Text    = title;
                ViewState["strSQL"] = strSQL;
            }
        }
Example #9
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            System.Collections.Generic.List <object> keyValues = grid.GetSelectedFieldValues(new string[] { grid.KeyFieldName });
            string ListChkBoxCmd = "";

            foreach (object key in keyValues)
            {
                ListChkBoxCmd = grid.GetRowValuesByKeyValue(key, "ListChkBoxCmd").ToString();
                conn.ExecNonQuery(ListChkBoxCmd, null, dbtimeout);
            }
            grid.Selection.UnselectAll();
            if (ListChkBoxCmd.IndexOf("USP_RESTORE_DATA") > 0)
            {
                Response.Write("<script>alert('Restore Data Success.')</script>");
            }
            ListSys.gridBind(grid, (string)ViewState["strSQL"], UC_ListFilter1.paramFilter, UC_ListFilter1.strFilter, conn);
        }
Example #10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     paramFilter = ListSys.FilterParam(this, ref strFilter);
     if (paramFilter.Length == 0)
     {
         mainTbl.Style["display"] = "none";
     }
     if (!IsPostBack && !this.Page.IsCallback)
     {
         initreff();
         DataTable dt = conn.GetDataTable("select LISTNEWBUTTON, NEWBUTTONCLICK from list where listid = @1", new object[] { Request.QueryString["li" + li_suffix] }, 600);
         if (dt.Rows[0]["LISTNEWBUTTON"].ToString() == "1")
         {
             btnnew.Style.Remove("display");
             btnnew.Attributes["onclick"] = "parent.window.location='" + dt.Rows[0]["NEWBUTTONCLICK"].ToString() + "'";
         }
     }
 }
Example #11
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; ");
        }
Example #12
0
        protected void grid_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            NameValueCollection nvcAuto      = new NameValueCollection();
            NameValueCollection nvcAutoField = new NameValueCollection();
            string stage = Request.QueryString["atype"];


            regno = grid.GetSelectedFieldValues("__KeyField");

            if (e.Parameters == "confirm")
            {
                try
                {
                    recalculate();
                }
                catch { }
                grid.JSProperties["cp_alert"]    = "Recalculate Success.";
                grid.JSProperties["cp_redirect"] = "BulkRecalculate.aspx?needFilter=1&passurl&mntitle=Bulk Recalculate&li=L|REC";
            }

            ListSys.gridBind(grid, (string)ViewState["strSQL"], UC_ListFilter1.paramFilter, UC_ListFilter1.strFilter, conn);
        }
Example #13
0
 protected void grid_Load(object sender, EventArgs e)
 {
     //object[] regno = new object[] { grid.GetSelectedFieldValues("__KeyField") };
     ListSys.gridBind(grid, (string)ViewState["strSQL"], UC_ListFilter1.paramFilter, UC_ListFilter1.strFilter, conn);
 }
Example #14
0
 protected void grid_Load(object sender, EventArgs e)
 {
     ListSys.gridBind(grid, (string)ViewState["strSQL"], UC_ListFilter1.paramFilter, UC_ListFilter1.strFilter, conn);
 }