Esempio n. 1
0
        protected void DropChanged(object sender, EventArgs e)
        {
            DropDownList ddl = (DropDownList)sender;
            GridViewRow  gvr = (GridViewRow)ddl.NamingContainer;
            GridView     gv  = (GridView)gvr.NamingContainer;

            int    gvRow = gvr.RowIndex;
            string gvID  = gv.ID;


            UpdateSales(ddl.ID, ddl.SelectedValue, gv.Rows[gvRow].Cells[0].Text);
            if (ddl.ID == "Program")
            {
                /*This portion of code is to notify this method ran and is related with an schedule*/

                FullSalesAuditCls.AuditSalesIdWithComment(gv.Rows[gvRow].Cells[0].Text, user, "Module: Exceptions, Method: DropChanged, Action: SalesId BEFORE AssignOwner is applied");

                Dictionary <string, string> Params = new Dictionary <string, string>();
                Params.Add("Action", "AssignOwner");
                Queries.ExecuteFromStoreProcedure("spx_PAYOUTExceptions", Params);

                FullSalesAuditCls.AuditSalesIdWithComment(gv.Rows[gvRow].Cells[0].Text, user, "Module: Exceptions, Method: DropChanged, Action: SalesId AFTER AssignOwner is applied");
            }

            gv.DataBind();
            setSelect();
        }
Esempio n. 2
0
        void setSelect()
        {
            SQLprogram.SelectCommand = "SELECT '' AS Program UNION ALL SELECT 'Misc' AS Program UNION ALL SELECT 'Return' AS Program UNION ALL SELECT * FROM (SELECT TOP 10000 Program FROM [PAYOUTschedule] WHERE Program != '' AND Program IS NOT NULL /*AND SalesDate BETWEEN DATEADD(DAY, -13, '" + webStartDate.SelectedValue + "') AND '" + webStartDate.SelectedValue + "'*/ GROUP BY Program ORDER BY Program)x";

            Dictionary <string, string> Params = new Dictionary <string, string>();

            Params.Add("storeDDL", storeDDL.SelectedValue);
            Params.Add("SalesDateTXT", saleDate.Text);
            Params.Add("StoreNumberTXT", StoreNumberTXT.Text);
            Params.Add("QtyOption", opDDL.SelectedValue);
            Params.Add("QtyText", opTXT.Text);
            Params.Add("WeText", webStartDate.SelectedValue);
            Params.Add("viewDDL", viewDDL.SelectedValue);
            Params.Add("Action", "SelectWithFilters");

            DataTable dt = Queries.GetResultsFromStoreProcedure("spx_PAYOUTExceptions", ref Params).Tables[0];

            FullSalesAuditCls.AuditExceptions(dt, viewDDL.SelectedValue, viewDDL.SelectedValue);

            Session["ExceptionsTable"] = dt;
            salesGrid.DataSource       = dt;
            salesGrid.DataBind();
        }