Ejemplo n.º 1
0
 protected void rdbselect_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (rdbselect.SelectedValue == "Area")
     {
         pnlzone.Visible     = true;
         pnlcustomer.Visible = false;
         // DDLSuperZone.SelectedIndex = 0;
         //DDLZone.SelectedIndex = 0;
         ddlCustmore.SelectedIndex       = 0;
         CustomerReportView.ReportSource = null;
         txtcustomer.Text = "";
         lblCustName.Text = "";
         DDLSuperZone.Focus();
     }
     else
     {
         pnlzone.Visible                 = false;
         pnlcustomer.Visible             = true;
         txtcustomer.Text                = "";
         lblCustName.Text                = "";
         CustomerReportView.ReportSource = null;
         DDLSuperZone.SelectedIndex      = 0;
         DDLZone.SelectedIndex           = 0;
         ddlCustmore.SelectedIndex       = 0;
         txtcustomer.Focus();
     }
 }
Ejemplo n.º 2
0
    protected void btnget_Click(object sender, EventArgs e)
    {
        DataSet ds = new DataSet();

        from  = txtfromDate.Text.Split('/')[1] + "/" + txtfromDate.Text.Split('/')[0] + "/" + txtfromDate.Text.Split('/')[2];
        To    = txtToDate.Text.Split('/')[1] + "/" + txtToDate.Text.Split('/')[0] + "/" + txtToDate.Text.Split('/')[2];
        fdate = Convert.ToDateTime(from);
        tdate = Convert.ToDateTime(To);
        if (fdate > tdate)
        {
            MessageBox("From Date is Greater than ToDate");
            txtfromDate.Focus();
        }

        else
        {
            //ds = Other.Dashboard.Get_SalesAnalysisReport(Convert.ToInt32(DDLSuperZone.SelectedValue), Convert.ToInt32(strFY), fdate, tdate, Convert.ToInt32(DDlZone.SelectedValue), rdbselect.SelectedValue.ToString().Trim());
            ds = Other.Dashboard.Get_SalesAnalysis_PART_II(Convert.ToInt32(DDLSuperZone.SelectedValue), Convert.ToInt32(strFY), fdate, tdate, Convert.ToInt32(DDlZone.SelectedValue), rdbselect.SelectedValue.ToString().Trim(),
                                                           Convert.ToInt32(ddlSDZone.SelectedValue));
            if (ds.Tables[0].Rows.Count > 0)
            {
                ViewState["partII"] = ds.Tables[0];
                ShowDetails(ds.Tables[0]);
            }
            else
            {
                MessageBox("Records Not Found");
                DDLSuperZone.Focus();
            }
        }
    }
    public void ShowDetails()
    {
        Session["DataFillCommission"] = null;
        DataSet        ds       = new DataSet();
        ReportDocument rd       = new ReportDocument();
        string         FromDate = DateTime.Now.ToString("MM/dd/yyyy");
        string         TODate   = DateTime.Now.ToString("MM/dd/yyyy");

        FromDate = txtFrom.Text.Split('/')[1] + "/" + txtFrom.Text.Split('/')[0] + "/" + txtFrom.Text.Split('/')[2];
        TODate   = txtTo.Text.Split('/')[1] + "/" + txtTo.Text.Split('/')[0] + "/" + txtTo.Text.Split('/')[2];
        try
        {
            ds = ObjDAL.Idv_Chetana_Commission_BkSeller(Convert.ToInt32(DDLZone.SelectedValue.ToString() == "" ? "0" : DDLZone.SelectedValue.ToString()), Convert.ToInt32(DDLSuperZone.SelectedValue.ToString() == "" ? "0" : DDLSuperZone.SelectedValue.ToString()),
                                                        FromDate, TODate, Convert.ToInt32(strFY), "", "");
            if (ds.Tables[0].Rows.Count > 0)
            {
                Session["DataFillCommission"] = ds.Tables[0];
                GetPrint(ds.Tables[0]);
            }
            else
            {
                Session["DataFillCommission"] = null;
                MessageBox("Record Not Found");
                DDLSuperZone.Focus();
                return;
            }
        }
        catch (Exception ex)
        {
            throw;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["ChetanaCompanyName"] != null)
        {
            if (Session["FY"] != null)
            {
                strChetanaCompanyName = Session["ChetanaCompanyName"].ToString();
                strFY    = Session["FY"].ToString();
                UserName = Session["UserName"].ToString();
            }
            else
            {
                Session.Clear();
            }
        }
        if (!Page.IsPostBack)
        {
            ViewState["DocNoRep"] = null;

            GetSuperZone();
            DDLSuperZone.Focus();
        }
        else
        {
            fillDataDocNo(0);
        }
    }
Ejemplo n.º 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["ChetanaCompanyName"] != "" || Session["ChetanaCompanyName"] != null)
        {
            if (Session["FY"] != "" || Session["FY"] != null)
            {
                strChetanaCompanyName = Session["ChetanaCompanyName"].ToString();
                strFY = Session["FY"].ToString();
            }
            else
            {
                Session.Clear();
            }
        }
        if (!Page.IsPostBack)
        {
            DDLSuperZone.Focus();

            Bind_DDL_SuperZone();
            pnlcust.Visible = true;
            ddlCustmore.Items.Insert(0, new ListItem("-Select Customer-", "0"));
            Bind_DDL_CC();
            Bind_DDL_Status();
            ViewState["Data"] = null;
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["ChetanaCompanyName"] != "" || Session["ChetanaCompanyName"] != null)
     {
         if (Session["FY"] != "" || Session["FY"] != null)
         {
             strChetanaCompanyName = Session["ChetanaCompanyName"].ToString();
             strFY = Session["FY"].ToString();
         }
         else
         {
             Session.Clear();
         }
     }
     if (!Page.IsPostBack)
     {
         DDLSuperZone.Focus();
         Bind_DDL_SuperZone();
         pnlcust.Visible = true;
         ddlCustmore.Items.Insert(0, new ListItem("-Select Customer-", "0"));
         Bind_DDL_CC();
     }
     if (IsPostBack)
     {
         if (DDLSuperZone.SelectedValue.ToLower().ToString() == "0")
         {
             MessageBox("Select Items");
         }
     }
     PnlAddDAC.Visible = false;
 }
Ejemplo n.º 7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["ChetanaCompanyName"] != null)
        {
            if (Session["FY"] != null)
            {
                strChetanaCompanyName = Session["ChetanaCompanyName"].ToString();
                strFY    = Session["FY"].ToString();
                UserName = Session["UserName"].ToString();
            }
            else
            {
                Session.Clear();
            }
            //Response.Write(strFY);
        }
        if (!Page.IsPostBack)
        {
            ViewState["DocNoRep"] = null;

            Bind_DDL_SuperZone();
            DDLSuperZone.Focus();

            //Session["getpasstempdata"] = null;
            //grdTemp.DataSource = null;
            //grdTemp.DataBind();
        }
        else
        {
            fillDataDocNo(0);
        }
    }
Ejemplo n.º 8
0
    private void BindReport()
    {
        //if (rdbAll.Checked == true)
        //{
        //    All = "All".ToString();
        //    DDLSuperZone.SelectedValue = "0";
        //    DDLZone.SelectedValue = "0";
        //}
        //else if (rdbAmount.Checked == true)
        //{
        //    Amount = Convert.ToInt32(txtAmount.Text == "" ? "0" : txtAmount.Text);
        //    DDLSuperZone.SelectedValue = "0";
        //    DDLZone.SelectedValue = "0";
        //}
        DataSet ds = OtherBAL.Idv_Chetana_PANReport(Convert.ToInt32(DDLSuperZone.SelectedValue.ToString()), Convert.ToInt32(DDLZone.SelectedValue.ToString()), Convert.ToInt32(Session["FY"]), "", "", "", "");

        if (ds.Tables[0].Rows.Count > 0)
        {
            ReportDocument rd = new ReportDocument();
            rd.Load(Server.MapPath("~/Report/PANReport.rpt"));
            rd.SetDataSource(ds.Tables[0]);
            //rd.SetParameterValue("SuperZoneName", DDLSuperZone.SelectedValue.ToString() == "0" ? "-" : DDLSuperZone.SelectedItem.Text);
            //rd.SetParameterValue("ZoneName", DDLZone.SelectedValue.ToString() == "0" ? "-" : DDLZone.SelectedItem.Text);
            CrystalPanReport.ReportSource = rd;
        }
        else
        {
            MessageBox("No record found");
            DDLSuperZone.Focus();
            return;
        }
    }
Ejemplo n.º 9
0
 protected void RdbtnSelect1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (RdbtnSelect1.SelectedValue == "Summary")
     {
         Pnl2.Visible = true;
         Pnl1.Visible = false;
         Response.Redirect(Request.RawUrl);
     }
     if (RdbtnSelect1.SelectedValue == "Details")
     {
         Pnl2.Visible = false;
         Pnl1.Visible = true;
         DDLSuperZone.Focus();
         DDLSuperZone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(0, "SuperZone");
         DDLSuperZone.DataBind();
         DDLSuperZone.Items.Insert(0, new ListItem("-Select Super Zone-", "0"));
         getDDLdata();
         txtfromDate.Text = Session["FromDate"].ToString();
         txtToDate.Text   = Session["ToDate"].ToString();
         DDLCC.DataSource = CustCategory.GetCustomerCategoryMaster("adminCCM");
         DDLCC.DataBind();
         DDLCC.Items.Insert(0, new ListItem("--Select Category--", "0"));
         DDLCC.Enabled = true;
     }
 }
Ejemplo n.º 10
0
    public void ShowDetails()
    {
        DataSet ds   = new DataSet();
        string  from = txtFromDate.Text.Split('/')[2] + "/" + txtFromDate.Text.Split('/')[1] + "/" + txtFromDate.Text.Split('/')[0];
        string  To   = txttoDate.Text.Split('/')[2] + "/" + txttoDate.Text.Split('/')[1] + "/" + txttoDate.Text.Split('/')[0];

        fdate = Convert.ToDateTime(from);
        tdate = Convert.ToDateTime(To);
        if (fdate > tdate)
        {
            MessageBox("From Date is Greater than ToDate");
            txtFromDate.Focus();
        }
        else
        {
            //ds = Other.Dashboard.Get_SalesAnalysisReport(Convert.ToInt32(DDLSuperZone.SelectedValue), Convert.ToInt32(strFY), fdate, tdate, Convert.ToInt32(DDlZone.SelectedValue), rdbselect.SelectedValue.ToString().Trim());
            ds = Other.Dashboard.Get_SalesAnalysisReport(Convert.ToInt32(DDLSuperZone.SelectedValue), Convert.ToInt32(strFY), fdate, tdate, Convert.ToInt32(DDLZone.SelectedValue), rdbselect.SelectedValue.ToString().Trim(),
                                                         Convert.ToInt32(ddlSDZone.SelectedValue), "");
            if (ds.Tables[0].Rows.Count > 0)
            {
                DataView       dv = new DataView(ds.Tables[0]);
                ReportDocument rd = new ReportDocument();

                rd.Load(Server.MapPath("Report/Salesanalysis.rpt"));
                rd.Database.Tables[0].SetDataSource(dv);
                SalesanalysisReportview.ReportSource = rd;
                //   ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "window", "f_open_window_max('print/PrintSalesAnalysis.aspx?d=" + DDLSuperZone.SelectedValue + "&sd=" + strFY + "&fd=" + fdate + "&td=" + tdate + "')", true);
            }
            else
            {
                MessageBox("Records Not Found");
                DDLSuperZone.Focus();
            }
        }
    }
Ejemplo n.º 11
0
    protected void Page_Load(object sender, EventArgs e)

    {
        url = Request.QueryString["a"];
        if (Session["ChetanaCompanyName"] != "" || Session["ChetanaCompanyName"] != null)
        {
            if (Session["FY"] != "" || Session["FY"] != null)
            {
                strChetanaCompanyName = Session["ChetanaCompanyName"].ToString();
                strFY = Session["FY"].ToString();
            }
            else
            {
                Session.Clear();
            }
        }
        if (!Page.IsPostBack)
        {
            // btnUpdate.Visible = false;
            DDLSuperZone.Focus();
            if (ddlCustmore.SelectedValue.ToLower().ToString() == "0" || ddlCustmore.SelectedValue.ToLower().ToString() == "")
            {
            }
            else
            {
                // ShowDetails();
                DataSet ds = new DataSet();
                ds = Idv.Chetana.BAL.Customer_cs.Idv_Chetana_Rep_Customer_AdditionalCommission(
                    Convert.ToInt32(DDLSuperZone.SelectedValue.ToString()),
                    Convert.ToInt32(DDLZone.SelectedValue.ToString()),
                    Convert.ToInt32(ddlCustmore.SelectedValue.ToString()),
                    Convert.ToInt32(DDLCC.SelectedValue.ToString()),
                    Convert.ToInt32(strFY));
                DataView dv = new DataView(ds.Tables[0]);
                gdGeneral.DataSource = dv;
                gdGeneral.DataBind();
                //btnUpdate.Visible = true;
            }

            Bind_DDL_SuperZone();
            pnlcust.Visible = true;
            //btnSave.Visible = true;
            ddlCustmore.Items.Insert(0, new ListItem("-Select Customer-", "0"));
            Bind_DDL_CC();
        }
        if (IsPostBack)
        {
            if (DDLSuperZone.SelectedValue.ToLower().ToString() == "0")
            {
                MessageBox("Select Items");
            }

            else
            {
                // ShowDetails();
                //btnUpdate.Visible = true;
            }
        }
    }
Ejemplo n.º 12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //if (ConfigurationManager.AppSettings["access"].ToString() != ConfigurationManager.AppSettings["accessok"].ToString())
        //{
        //    string page = Request.Url.Segments[Request.Url.Segments.Length - 1].ToString();
        //    if (Session["Role"] != null)
        //    {
        //        if (!Other.Get_UserAccess(page, Session["Role"].ToString()))
        //        {
        //            Response.Redirect("dashboard.aspx");
        //        }
        //    }
        if (Session["ChetanaCompanyName"] != null)
        {
            if (Session["FY"] != null)
            {
                strChetanaCompanyName = Session["ChetanaCompanyName"].ToString();
                strFY = Session["FY"].ToString();
            }
            else
            {
                Session.Clear();
            }
        }
        if (IsPostBack)
        {
            //if (DDLSuperZone.SelectedValue == "0")
            //{

            //}
            if (txtfromDate.Text == "" || txtToDate.Text == "")
            {
            }
            else
            {
                ShowDetails();
            }
        }
        if (!Page.IsPostBack)
        {
            DDLSuperZone.Focus();
            Pnl2.Visible = true;
            Pnl1.Visible = false;
            //if (RdbtnSelect1.SelectedValue == "Details")
            //{
            //    DDLSuperZone.Focus();
            //    DDLSuperZone.DataSource = Masters.Get_Masters_Code_ID_Name("superzone");
            //    DDLSuperZone.DataBind();
            //    DDLSuperZone.Items.Insert(0, new ListItem("-Select Super Zone-", "0"));
            //    getDDLdata();
            //}
            //else
            //{
            //}
            //DDlZone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(Convert.ToInt32(DDlZone.SelectedValue.ToString()), "Zone");
            //DDlZone.DataBind();
            //DDlZone.Items.Insert(0, new ListItem("-Select Zone-", "0"));
        }
    }
Ejemplo n.º 13
0
 public void Bind_DDL_SuperDuperZone()
 {
     ddlSDZone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(0, "SDZone");
     ddlSDZone.DataBind();
     ddlSDZone.Items.Insert(0, new ListItem("-ALL Super Duper Zone-", "0"));
     DDLSuperZone.Items.Insert(0, new ListItem("-ALL Super Zone-", "0"));
     DDLSuperZone.Focus();
 }
Ejemplo n.º 14
0
 public void Bind_DDL_SuperZone()
 {
     DDLSuperZone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(0, "SuperZone");
     DDLSuperZone.DataBind();
     DDLSuperZone.Items.Insert(0, new ListItem("-- Select SuperZone --", "0"));
     DDLZone.Items.Insert(0, new ListItem("-Select Zone-", "0"));
     DDLSuperZone.Focus();
 }
Ejemplo n.º 15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["ChetanaCompanyName"] != null)
        {
            if (Session["FY"] != "" || Session["FY"] != null)
            {
                strChetanaCompanyName = Session["ChetanaCompanyName"].ToString();
                strFY = Session["FY"].ToString();
            }
            else
            {
                Session.Clear();
            }
            //Response.Write(strFY);
        }
        if (!IsPostBack)
        {
            setdefaultdate();
            //Bind();
        }
        if (!Page.IsPostBack)
        {
            DDLSuperZone.Focus();


            Bind_DDL_SuperZone();
            pnlcust.Visible = true; Bind_DDL_CC();
        }
        if (IsPostBack)
        {
            if (DDLSuperZone.SelectedValue.ToLower().ToString() == "0")
            {
                MessageBox("Select Items");
            }

            else
            {
                //Bind();
            }
        }
        if (rdOptions.SelectedIndex == 0)
        {
            val = "CWE";
        }
        else if (rdOptions.SelectedIndex == 1)
        {
            val = "CWP";
        }
        else if (rdOptions.SelectedIndex == 2)
        {
            val = "CWAA";
        }
        else if (rdOptions.SelectedIndex == 3)
        {
            val = "CWAADAC";
        }
    }
Ejemplo n.º 16
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (ConfigurationManager.AppSettings["access"].ToString() != ConfigurationManager.AppSettings["accessok"].ToString())
        {
            string page = Request.Url.Segments[Request.Url.Segments.Length - 1].ToString();
            if (Session["Role"] != null)
            {
                if (!Other.Get_UserAccess(page, Session["Role"].ToString()))
                {
                    Response.Redirect("dashboard.aspx");
                }
            }
        }
        if (Session["ChetanaCompanyName"] != null)
        {
            if (Session["FY"] != null)
            {
                strChetanaCompanyName = Session["ChetanaCompanyName"].ToString();
                strFY = Session["FY"].ToString();
            }
            else
            {
                Session.Clear();
            }
        }
        if (IsPostBack)
        {
            if (RdbtnSelect1.SelectedValue == "Summary-Excel")
            {
                Object o = null;

                if (txtfromDate1.Text != "" || txtToDate1.Text != "")
                {
                    Pnl2.Visible = false;
                    Pnl1.Visible = false;
                    Pnl3.Visible = true;
                    this.btnget1_Click(o, EventArgs.Empty);
                }
            }
            else
            {
                if (txtfromDate.Text != "" || txtToDate.Text != "")
                {
                    ShowDetails();
                }
            }
        }
        if (!Page.IsPostBack)
        {
            DDLSuperZone.Focus();
            Pnl2.Visible = true;
            Pnl1.Visible = false;
            Pnl3.Visible = false;
        }
    }
Ejemplo n.º 17
0
 public void Bind_DDL_SuperZone()
 {
     DDLSuperZone.Items.Clear();
     if (ddlSDZone.SelectedIndex != 0)
     {
         DDLSuperZone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(Convert.ToInt32(ddlSDZone.SelectedValue.ToString()), "SuperZone1");
         DDLSuperZone.DataBind();
         DDLSuperZone.Focus();
     }
     DDLSuperZone.Items.Insert(0, new ListItem("-All Super Zone-", "0"));
 }
Ejemplo n.º 18
0
    public void SaveAreaZoneMaster()
    {
        if (DDLSuperZone.SelectedIndex == 0)
        {
            MessageBox("Select SuperZone");
            DDLSuperZone.Focus();
        }
        if (DDLZone.SelectedIndex == 0)
        {
            MessageBox("Select Zone");
            DDLZone.Focus();
        }
        else
        {
            AreaZoneMaster _ObjAreaZoneMaster = new AreaZoneMaster();
            _ObjAreaZoneMaster.AreaZoneID   = Convert.ToInt32(lblID.Text);
            _ObjAreaZoneMaster.AreaZoneCode = txtAreaZoneCode.Text.Trim();
            _ObjAreaZoneMaster.AreaZoneName = txtAreaZoneName.Text.Trim();
            _ObjAreaZoneMaster.ZoneID       = Convert.ToInt32(DDLZone.SelectedItem.Value.ToString());
            _ObjAreaZoneMaster.IsActive     = Chekacv.Checked;

            try
            {
                _ObjAreaZoneMaster.Save();
                MessageBox("Record saved successfully");
                grdAreaZoneDetails.DataSource = BindAreaZoneDetail();
                grdAreaZoneDetails.DataBind();
                if (btnSave.Text == "Update")
                {
                    pnlAreaZoneDetails.Visible = true;
                    PnlAreaZone.Visible        = false;
                    btnSave.Visible            = false;
                    btnSave.Text            = "Save";
                    txtAreaZoneCode.Enabled = true;
                    filter.Visible          = true;
                }
                else
                {
                    PnlAreaZone.Visible        = true;
                    pnlAreaZoneDetails.Visible = false;
                    txtAreaZoneCode.Text       = "";
                    txtAreaZoneName.Text       = "";
                    DDLSuperZone.SelectedValue = null;
                    DDLZone.Items.Clear();
                    //DDLZone.SelectedValue = null;
                    Bind_DDL_SuperZone();
                }
            }
            catch
            {
            }
        }
    }
    public void Bind_DDL_SuperZone()
    {
        //DDLSuperZone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(0, "SuperZone");
        //DDLSuperZone.DataBind();
        //DDLSuperZone.Items.Insert(0, new ListItem("-Select Super Zone-", "0"));
        //DDLZone.Items.Insert(0, new ListItem("-Select Zone-", "0"));

        DDLSuperZone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(Convert.ToInt32(ddlSDZone.SelectedValue.ToString()), "SuperZone1");
        DDLSuperZone.DataBind();
        DDLSuperZone.Items.Insert(0, new ListItem("-- Select SuperZone --", "0"));
        DDLZone.Items.Insert(0, new ListItem("-Select Zone-", "0"));
        DDLSuperZone.Focus();
    }
 protected void DDLSuperZone_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (DDLSuperZone.SelectedIndex == 0)
     {
         DDLSuperZone.Focus();
         DDLZone.Items.Clear();
     }
     else
     {
         Bind_DDL_Zone();
         DDLZone.Focus();
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["ChetanaCompanyName"] != null)
     {
         if (Session["FY"] != null)
         {
             strChetanaCompanyName = Session["ChetanaCompanyName"].ToString();
             strFY = Session["FY"].ToString();
         }
         else
         {
             Session.Clear();
         }
         //Response.Write(strFY);
     }
     if (!Page.IsPostBack)
     {
         DDLSuperZone.Focus();
         if (ddlCustmore.SelectedValue.ToLower().ToString() == "0" || ddlCustmore.SelectedValue.ToLower().ToString() == "")
         {
         }
         else
         {
             // ShowDetails();
         }
         Bind_DDL_CC();
         Bind_DDL_SuperZone();
         pnlcust.Visible = true;
         //btnSave.Visible = true;
         ddlCustmore.Items.Insert(0, new ListItem("-Select Customer-", "0"));
         txtFrom.Text = Session["FromDate"].ToString();
         txtTo.Text   = Session["ToDate"].ToString();
     }
     if (IsPostBack)
     {
         if (DDLSuperZone.SelectedValue.ToLower().ToString() == "0")
         {
             MessageBox("Select Items");
         }
         else if (txtFrom.Text == "")
         {
         }
         else if (txtTo.Text == "")
         {
         }
         else
         {
             ShowDetails();
         }
     }
 }
 protected void DDLSuperZone_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (DDLSuperZone.SelectedIndex == 0)
     {
         DDLSuperZone.Focus();
         DDLZone.Items.Clear();
         DDLZone.Items.Insert(0, new ListItem("--All--", "0"));
     }
     else
     {
         Bind_DDL_Zone();
         DDLZone.Focus();
     }
 }
Ejemplo n.º 23
0
 protected void ddlSDZone_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (ddlSDZone.SelectedIndex == 0)
     {
         DDLSuperZone.Items.Clear();
         DDLSuperZone.Items.Insert(0, new ListItem("-Select Super Zone-", "0"));
     }
     else
     {
         DDLSuperZone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(Convert.ToInt32(ddlSDZone.SelectedValue.ToString()), "SuperZone1");
         DDLSuperZone.DataBind();
         DDLSuperZone.Items.Insert(0, new ListItem("-- Select SuperZone --", "0"));
         DDLSuperZone.Focus();
     }
 }
Ejemplo n.º 24
0
 protected void DDLSuperZone_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (DDLSuperZone.SelectedIndex == 0)
     {
         DDLSuperZone.Focus();
         DDLZone.Items.Clear();
         Bind_DDL_SuperZone();
     }
     else
     {
         Bind_DDL_Zone();
         //rdbAll.Checked = false;
         //rdbAmount.Checked = false;
         DDLZone.Focus();
     }
 }
Ejemplo n.º 25
0
 protected void DDLSuperZone_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (DDLSuperZone.SelectedIndex == 0)
     {
         // MessageBox("Select SuperZone");
         DDLSuperZone.Focus();
         DDLZone.Items.Clear();
         //  DDLZone.SelectedValue = null;
         Bind_DDL_SuperZone();
     }
     else
     {
         Bind_DDL_Zone();
         DDLZone.Focus();
     }
 }
 protected void ddlSDZone_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (ddlSDZone.SelectedIndex == 0)
     {
         ddlSDZone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(0, "SDZone");
         ddlSDZone.DataBind();
         ddlSDZone.Focus();
         DDLSuperZone.Items.Clear();
         DDLSuperZone.Items.Insert(0, new ListItem("-Select Super Zone-", "0"));
     }
     else
     {
         Bind_DDL_SuperZone();
         DDLSuperZone.Focus();
     }
 }
Ejemplo n.º 27
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     if (DDLSuperZone.SelectedIndex == 0)
     {
         MessageBox("Select SuperZone");
         DDLSuperZone.Focus();
     }
     else
     {
         ZoneMaster _objZm = new ZoneMaster();
         _objZm.ZoneID      = Convert.ToInt32(lblID.Text);
         _objZm.ZoneCode    = txtZoneCode.Text.Trim();
         _objZm.ZoneName    = txtZoneName.Text.Trim();
         _objZm.SuperZoneID = Convert.ToInt32(DDLSuperZone.SelectedItem.Value.ToString());
         _objZm.IsActive    = Chekacv.Checked;
         try
         {
             _objZm.Save();
             MessageBox("Record saved successfully");
             grdZoneDetails.DataSource = BindGvZoneDetail();
             grdZoneDetails.DataBind();
             if (btnSave.Text == "Update")
             {
                 pnlZoneDetails.Visible = true;
                 pnlZone.Visible        = false;
                 btnSave.Visible        = false;
                 btnSave.Text           = "Save";
                 txtZoneCode.Enabled    = true;
                 filter.Visible         = true;
             }
             else
             {
                 pnlZoneDetails.Visible = false;
                 pnlZone.Visible        = true;
                 txtZoneCode.Text       = "";
                 txtZoneCode.Focus();
                 txtZoneName.Text           = "";
                 DDLSuperZone.SelectedValue = null;
             }
         }
         catch
         {
         }
     }
 }
Ejemplo n.º 28
0
 protected void DDLSuperZone_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (DDLSuperZone.SelectedIndex == 0)
     {
         DDLSuperZone.Focus();
         //lblszselect.Visible = false;
         DDLZone.Items.Clear();
         DDLZone.Items.Insert(0, new ListItem("--Select Zone--", "0"));
         lblsdzselect.Text = "Selected : " + ddlSDZone.SelectedItem.Text.ToString();
     }
     else
     {
         Bind_DDL_Zone();
         //lblszselect.Visible = true;
         lblsdzselect.Text = "Selected : " + ddlSDZone.SelectedItem.Text.ToString() + " : " + DDLSuperZone.SelectedItem.Text.ToString();
         DDLZone.Focus();
     }
 }
Ejemplo n.º 29
0
 protected void ddlSDZone_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (ddlSDZone.SelectedIndex == 0)
     {
         // MessageBox("Select SuperZone");
         lblsdzselect.Visible = true;
         lblsdzselect.Text    = "Selected : " + ddlSDZone.SelectedItem.Text.ToString();
         DDLSuperZone.Items.Clear();
         DDLSuperZone.Items.Insert(0, new ListItem("-Select Super Zone-", "0"));
         //  DDLZone.SelectedValue = null;
         // Bind_DDL_ZoneCust();
     }
     else
     {
         DDLSuperZone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(Convert.ToInt32(ddlSDZone.SelectedValue.ToString()), "SuperZone1");
         DDLSuperZone.DataBind();
         DDLSuperZone.Items.Insert(0, new ListItem("-- Select SuperZone --", "0"));
         DDLSuperZone.Focus();
         //lblsdzselect.Visible = true;
         lblsdzselect.Text = "Selected : " + ddlSDZone.SelectedItem.Text.ToString();
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["ChetanaCompanyName"] != null)
     {
         if (Session["FY"] != null)
         {
             strChetanaCompanyName = Session["ChetanaCompanyName"].ToString();
             strFY = Session["FY"].ToString();
         }
         else
         {
             Session.Clear();
         }
         //Response.Write(strFY);
     }
     if (!Page.IsPostBack)
     {
         Bind_DDL_SuperZone();
         DDLSuperZone.Focus();
     }
     if (IsPostBack)
     {
         if (DDLSuperZone.SelectedValue.ToLower().ToString() == "0")
         {
             // MessageBox("Select Items");
         }
         else if (txtFrom.Text == "")
         {
         }
         else if (txtTo.Text == "")
         {
         }
         else
         {
             ShowDetails();
         }
     }
 }