Beispiel #1
0
        protected void DDLCustGroup_SelectedIndexChanged(object sender, EventArgs e)
        {
            CreamBell_DMS_WebApps.App_Code.Global obj = new CreamBell_DMS_WebApps.App_Code.Global();

            if (DDLCustGroupNew.Text == "ALL")
            {
                string queryALLCustomer = " Select CUSTOMER_CODE, CUSTOMER_NAME from ax.acxcustmaster where  SITE_CODE='" + Session["SiteCode"].ToString() +
                                          "' and DATAAREAID='" + Session["DATAAREAID"].ToString() + "'" +
                                          " UNION " +
                                          "SELECT SUBDISTRIBUTOR AS Customer_Code, SUBDISTRIBUTOR + '-' + NAME AS CUSTOMER_NAME  from ax.ACX_SDLINKING where OTHER_SITE='" + Session["SiteCode"].ToString() +
                                          "' and DATAAREAID='" + Session["DATAAREAID"].ToString() + "'";

                DDLCustomersNew.Items.Clear();
                DDLCustomersNew.Items.Add("-Select-");
                obj.BindToDropDownp(DDLCustomersNew, queryALLCustomer, "CUSTOMER_NAME", "CUSTOMER_CODE");
            }
            else
            {
                string queryCustomer = " Select CUSTOMER_CODE, CUSTOMER_NAME from ax.acxcustmaster where CUST_GROUP='" + DDLCustGroupNew.SelectedValue.ToString() + "' " +
                                       " and SITE_CODE='" + Session["SiteCode"].ToString() + "' and DATAAREAID='" + Session["DATAAREAID"].ToString() + "'" +
                                       " UNION " +
                                       "SELECT SUBDISTRIBUTOR AS Customer_Code, SUBDISTRIBUTOR + '-' + NAME AS CUSTOMER_NAME  from ax.ACX_SDLINKING where CUSTGROUP='" + DDLCustGroupNew.SelectedValue.ToString() + "' " +
                                       " and OTHER_SITE='" + Session["SiteCode"].ToString() + "' and DATAAREAID='" + Session["DATAAREAID"].ToString() + "'";

                DDLCustomersNew.Items.Clear();
                DDLCustomersNew.Items.Add("-Select-");
                obj.BindToDropDownp(DDLCustomersNew, queryCustomer, "CUSTOMER_NAME", "CUSTOMER_CODE");
            }
        }
Beispiel #2
0
        protected void DDLProductGroup_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                CreamBell_DMS_WebApps.App_Code.Global obj = new CreamBell_DMS_WebApps.App_Code.Global();

                if (DDLProductGroupNew.Text == "ALL")
                {
                    DDLSubCategoryNew.Items.Clear();
                    DDLProductNew.Items.Clear();
                }
                else
                {
                    string strQuery = " Select distinct  replace(replace(PRODUCT_SUBCATEGORY, char(9), ''), char(13) + char(10), '')  as SUBCATEGORY from  " +
                                      " ax.INVENTTABLE where replace(replace(PRODUCT_GROUP, char(9), ''), char(13) + char(10), '') = '" + DDLProductGroupNew.SelectedItem.Text.ToString() + "' ";


                    DDLSubCategoryNew.Items.Clear();
                    DDLSubCategoryNew.Items.Clear();
                    DDLSubCategoryNew.Items.Add("-Select-");
                    obj.BindToDropDownp(DDLSubCategoryNew, strQuery, "SUBCATEGORY", "SUBCATEGORY");
                }
            }
            catch (Exception ex)
            {
                ErrorSignal.FromCurrentContext().Raise(ex);
            }
        }
Beispiel #3
0
        protected void DDLCustGroup_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                CreamBell_DMS_WebApps.App_Code.Global obj = new CreamBell_DMS_WebApps.App_Code.Global();

                if (DDLCustGroupNew.Text == "ALL")
                {
                    string queryALLCustomer = " Select CUSTOMER_CODE, CUSTOMER_NAME from ax.acxcustmaster where  SITE_CODE='" + Session["SiteCode"].ToString() +
                                              "' and DATAAREAID='" + Session["DATAAREAID"].ToString() + "'and BLOCKED = 0";

                    DDLCustomersNew.Items.Clear();
                    //DDLCustomers.Items.Add("-Select-");
                    //obj.BindToDropDown(DDLCustomers, queryALLCustomer, "CUSTOMER_NAME", "CUSTOMER_CODE");
                }
                else
                {
                    string queryCustomer = " Select CUSTOMER_CODE, CUSTOMER_NAME from ax.acxcustmaster where CUST_GROUP='" + DDLCustGroupNew.SelectedValue.ToString() + "' " +
                                           " and SITE_CODE='" + Session["SiteCode"].ToString() + "' and DATAAREAID='" + Session["DATAAREAID"].ToString() + "'and BLOCKED = 0";

                    DDLCustomersNew.Items.Clear();
                    DDLCustomersNew.Items.Add("-Select-");
                    obj.BindToDropDownp(DDLCustomersNew, queryCustomer, "CUSTOMER_NAME", "CUSTOMER_CODE");
                }
            }
            catch (Exception ex)
            {
                ErrorSignal.FromCurrentContext().Raise(ex);
            }
        }
Beispiel #4
0
        private void BindFilters()
        {
            CreamBell_DMS_WebApps.App_Code.Global obj = new CreamBell_DMS_WebApps.App_Code.Global();

            string queryCustomerGroup = " Select CUSTGROUP_CODE, CUSTGROUP_NAME, CUSTGROUP_CODE+'-'+ CUSTGROUP_NAME as CUSTGROUP from [ax].[ACXCUSTGROUPMASTER] where DATAAREAID='" + Session["DATAAREAID"].ToString() + "' and BLOCKED<>1 ";

            DDLCustGroupNew.Items.Clear();
            DDLCustGroupNew.Items.Add("ALL");
            obj.BindToDropDownp(DDLCustGroupNew, queryCustomerGroup, "CUSTGROUP", "CUSTGROUP_CODE");

            string query = "select bm.bu_code,bu_desc from ax.acxsitebumapping sbp join ax.ACXBUMASTER bm on bm.bu_code = sbp.BU_CODE where SITEID = '" + Convert.ToString(Session["SiteCode"]) + "'";

            DDLBusinessUnitNew.Items.Clear();
            DDLBusinessUnitNew.Items.Add("All...");
            obj.BindToDropDownp(DDLBusinessUnitNew, query, "bu_desc", "bu_code");
            DDLCustGroup_SelectedIndexChanged(null, null);
        }
Beispiel #5
0
        private void BindFilters()
        {
            CreamBell_DMS_WebApps.App_Code.Global obj = new CreamBell_DMS_WebApps.App_Code.Global();

            string queryCustomerGroup = " Select CUSTGROUP_CODE, CUSTGROUP_NAME, CUSTGROUP_CODE+'-'+ CUSTGROUP_NAME as CUSTGROUP from [ax].[ACXCUSTGROUPMASTER] where DATAAREAID='" + Session["DATAAREAID"].ToString() + "' and BLOCKED<>1 ";

            DDLCustGroupNew.Items.Clear();
            DDLCustGroupNew.Items.Add("ALL");
            obj.BindToDropDownp(DDLCustGroupNew, queryCustomerGroup, "CUSTGROUP", "CUSTGROUP_CODE");
        }
Beispiel #6
0
        private void BindFilters()
        {
            try
            {
                CreamBell_DMS_WebApps.App_Code.Global obj = new CreamBell_DMS_WebApps.App_Code.Global();

                string queryCustomerGroup = " Select CUSTGROUP_CODE, CUSTGROUP_NAME, CUSTGROUP_CODE+'-'+ CUSTGROUP_NAME as CUSTGROUP from [ax].[ACXCUSTGROUPMASTER] where DATAAREAID='" + Session["DATAAREAID"].ToString() + "' and BLOCKED<>1 ";
                DDLCustGroupNew.Items.Clear();
                DDLCustGroupNew.Items.Add("ALL");
                obj.BindToDropDownp(DDLCustGroupNew, queryCustomerGroup, "CUSTGROUP", "CUSTGROUP_CODE");

                string queryProductGroup = "Select distinct PRODUCT_GROUP from ax.INVENTTABLE";
                DDLProductGroupNew.Items.Clear();
                DDLProductGroupNew.Items.Add("ALL");
                obj.BindToDropDownp(DDLProductGroupNew, queryProductGroup, "PRODUCT_GROUP", "PRODUCT_GROUP");
            }
            catch (Exception ex)
            {
                ErrorSignal.FromCurrentContext().Raise(ex);
            }
        }
Beispiel #7
0
 public void fillCustomerGroup()
 {
     try
     {
         query = "Select CUSTGROUP_CODE+'-'+CUSTGROUP_NAME as Name,CUSTGROUP_CODE from ax.ACXCUSTGROUPMASTER where DATAAREAID ='" + Session["DATAAREAID"].ToString() + "' and  Blocked = 0";
         drpCustomerGroupNew.Items.Clear();
         drpCustomerGroupNew.Items.Add("--Select--");
         obj.BindToDropDownp(drpCustomerGroupNew, query, "Name", "CUSTGROUP_CODE");
     }
     catch (Exception ex)
     {
         ErrorSignal.FromCurrentContext().Raise(ex);
     }
 }
Beispiel #8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["USERID"] == null || Session["USERID"].ToString() == string.Empty)
     {
         Response.Redirect("Login.aspx");
         return;
     }
     if (!IsPostBack)
     {
         string query = "select bm.bu_code,bu_desc from ax.acxsitebumapping sbp join ax.ACXBUMASTER bm on bm.bu_code = sbp.BU_CODE where SITEID ='" + ucRoleFilters.GetCommaSepartedSiteId() + "' ";
         DDLBusinessUnitNew.Items.Clear();
         DDLBusinessUnitNew.Items.Add("All...");
         baseObj.BindToDropDownp(DDLBusinessUnitNew, query, "bu_desc", "bu_code");
         fillStateCode();
         fillSiteCode();
     }
 }
Beispiel #9
0
        protected void DDLSubCategory_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                CreamBell_DMS_WebApps.App_Code.Global obj = new CreamBell_DMS_WebApps.App_Code.Global();
                if (DDLSubCategoryNew.Text == "-Select-")
                {
                    DDLProductNew.Items.Clear();
                }
                else
                {
                    string strQuery = " Select ITEMID +'-(' + PRODUCT_NAME+')' as PRODUCT_NAME,PRODUCT_NAME as PRODDESCP, ITEMID,PRODUCT_GROUP, PRODUCT_SUBCATEGORY from ax.INVENTTABLE where " +
                                      " replace(replace(PRODUCT_SUBCATEGORY, char(9), ''), char(13) + char(10), '') = '" + DDLSubCategoryNew.SelectedItem.Text.ToString() + "' ";

                    DDLProductNew.Items.Clear();
                    DDLProductNew.Items.Add("-Select-");
                    obj.BindToDropDownp(DDLProductNew, strQuery, "PRODUCT_NAME", "PRODDESCP");
                }
            }
            catch (Exception ex)
            {
                ErrorSignal.FromCurrentContext().Raise(ex);
            }
        }