Ejemplo n.º 1
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);
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
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);
     }
 }
Ejemplo n.º 4
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);
        }
Ejemplo n.º 5
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);
        }
Ejemplo n.º 6
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);
        }
Ejemplo n.º 7
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);
 }
Ejemplo n.º 8
0
 protected void grid_Load(object sender, EventArgs e)
 {
     ListSys.gridBind(grid, (string)ViewState["strSQL"], UC_ListFilter1.paramFilter, UC_ListFilter1.strFilter, conn);
 }