protected void RdbtnSelect_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (RdbtnSelect.SelectedValue == "Bookwise")
        {
            DDLsuperzone.Focus();

            lblbk.Visible    = true;
            txtbkcod.Visible = true;

            lblbkt.Visible    = false;
            txtbktype.Visible = false;
        }
        if (RdbtnSelect.SelectedValue == "BookTypewise")
        {
            DDLsuperzone.Focus();

            lblbk.Visible    = false;
            txtbkcod.Visible = false;

            lblbkt.Visible    = true;
            txtbktype.Visible = true;
        }

        txtbkcod.Text              = "";
        txtbktype.Text             = "";
        txtfromDate.Text           = "";
        txttoDate.Text             = "";
        DDLsuperzone.SelectedIndex = 0;
    }
Esempio n. 2
0
 public void Bind_DDL_SuperZone()
 {
     //DDLsuperzone.DataSource = SuperZone.GetSuperzonemaster();
     DDLsuperzone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(Convert.ToInt32(ddlSDZone.SelectedValue.ToString()), "SuperZone1");
     DDLsuperzone.DataBind();
     DDLsuperzone.Items.Insert(0, new ListItem("-- Select SuperZone --", "0"));
 }
Esempio n. 3
0
    protected void RdbtnSelect_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (RdbtnSelect.SelectedValue == "Bookwise")
        {
            DDLsuperzone.Focus();

            lblbk.Visible    = true;
            txtbkcod.Visible = true;

            lblbkt.Visible    = false;
            txtbktype.Visible = false;
        }
        if (RdbtnSelect.SelectedValue == "BookTypewise")
        {
            DDLsuperzone.Focus();

            lblbk.Visible    = false;
            txtbkcod.Visible = false;

            lblbkt.Visible    = true;
            txtbktype.Visible = true;
        }

        txtbkcod.Text              = "";
        txtbktype.Text             = "";
        txtfromDate.Text           = "";
        txttoDate.Text             = "";
        DDLsuperzone.SelectedIndex = 0;
        DDLzone.Items.Clear();
        DDLzone.Items.Insert(0, new ListItem("-Select Zone-", "0"));
    }
Esempio n. 4
0
 public void BindSuperZone()
 {
     DDLsuperzone.DataSource = SuperZone.GetSuperzonemaster();
     DDLsuperzone.DataBind();
     DDLsuperzone.Items.Insert(0, new ListItem("-Select SuperZone-", "0"));
     DDLzone.Items.Clear();
     DDLzone.Items.Insert(0, new ListItem("-Select Zone-", "0"));
 }
Esempio n. 5
0
 protected void DDLSDZone_SelectedIndexChanged(object sender, EventArgs e)
 {
     DDLsuperzone.Items.Clear();
     DDLsuperzone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(Convert.ToInt32(DDLSDZone.SelectedValue.ToString()), "SuperZone1");
     DDLsuperzone.DataBind();
     DDLsuperzone.Items.Insert(0, new ListItem("All", "0"));
     DDLsuperzone.Enabled = true;
     DDLsuperzone.Focus();
 }
    private void fillzones()
    {
        DDLsuperzone.DataSource = SuperZone.GetSuperzonemaster();
        DDLsuperzone.DataBind();
        DDLsuperzone.Items.Insert(0, new ListItem("--Select SuperZone--", "0"));
        ddLStates.DataSource = Destination.GetDestination(flag);
        ddLStates.DataBind();
        ddLStates.Items.Insert(0, new ListItem("--Select State--", "0"));

        ddlCity.Items.Insert(0, new ListItem("--Select City--", "0"));
    }
Esempio n. 7
0
 protected void DDLsuperzone_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (DDLsuperzone.SelectedIndex == 0)
     {
         DDLsuperzone.Focus();
         BindSuperZone();
     }
     else
     {
         BindZone_SuperZone();
         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();
            DDLsuperzone.DataSource = SuperZone.GetSuperzonemaster();
            DDLsuperzone.DataBind();
            DDLsuperzone.Items.Insert(0, new ListItem("-- Select SuperZone --", "0"));
        }
        if (IsPostBack)
        {
            if (txtfromDate.Text.Trim() != "" && txtToDate.Text.Trim() != "")
            {
                string from = txtfromDate.Text.Split('/')[1] + "/" + txtfromDate.Text.Split('/')[0] + "/" + txtfromDate.Text.Split('/')[2];
                string To   = txtToDate.Text.Split('/')[1] + "/" + txtToDate.Text.Split('/')[0] + "/" + txtToDate.Text.Split('/')[2];
                fdate = Convert.ToDateTime(from);
                tdate = Convert.ToDateTime(To);

                if (rdbselect.SelectedValue == "summary")
                {
                    ShowDetails1();
                }
                else
                {
                    ShowDetails();
                }
            }
            else
            {
                //MessageBox("Select Date");
            }
        }
    }
    private void fillzones()
    {
        DDLsuperzone.DataSource = SuperZone.GetSuperzonemaster();
        DDLsuperzone.DataBind();
        DDLsuperzone.Items.Insert(0, new ListItem("--Select SuperZone--", "0"));
        ddLStates.DataSource = Destination.GetDestination(flag);
        ddLStates.DataBind();
        ddLStates.Items.Insert(0, new ListItem("--Select State--", "0"));

        ddlCity.Items.Insert(0, new ListItem("--Select City--", "0"));


        DDLCC.DataSource = CustCategory.GetCustomerCategoryMaster("adminCCM");
        DDLCC.DataBind();
        DDLCC.Items.Insert(0, new ListItem("--Select Category--", "0"));
        DDLCSC.Items.Insert(0, new ListItem("--Select Sub Category--", "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();
            }
            else
            {
                Session.Clear();
            }
        }

        if (!Page.IsPostBack)
        {
            DDLsuperzone.Focus();
            DDLsuperzone.DataSource = SuperZone.GetSuperzonemaster();
            DDLsuperzone.DataBind();
            DDLsuperzone.Items.Insert(0, new ListItem("-- Select SuperZone --", "0"));
            BindCustCategory();
            txtfromDate.Text = Session["FromDate"].ToString();
            txtToDate.Text   = Session["ToDate"].ToString();
        }
        if (IsPostBack)
        {
            if (txtfromDate.Text.Trim() != "" && txtToDate.Text.Trim() != "")
            {
                string from = txtfromDate.Text.Split('/')[1] + "/" + txtfromDate.Text.Split('/')[0] + "/" + txtfromDate.Text.Split('/')[2];
                string To   = txtToDate.Text.Split('/')[1] + "/" + txtToDate.Text.Split('/')[0] + "/" + txtToDate.Text.Split('/')[2];
                fdate = Convert.ToDateTime(from);
                tdate = Convert.ToDateTime(To);


                ShowDetails1();
            }
            else
            {
            }
        }
    }
Esempio n. 11
0
    protected void ddlSDZone_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (ddlSDZone.SelectedIndex == 0)
        {
            // MessageBox("Select SuperZone");

            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"));
            //  DDLZone.SelectedValue = null;
            // Bind_DDL_ZoneCust();
        }
        else
        {
            Bind_DDL_SuperZone();
            DDLsuperzone.Focus();
        }
    }
Esempio n. 12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["FY"] != null)
        {
            strFY = Session["FY"].ToString();
        }
        else
        {
            Session.Clear();
        }
        //Response.Write(strFY);



        if (!Page.IsPostBack)
        {
            DDLsuperzone.Focus();
            DDLsuperzone.DataSource = SuperZone.GetSuperzonemaster();
            DDLsuperzone.DataBind();
            DDLsuperzone.Items.Insert(0, new ListItem("-- Select SuperZone --", "0"));
        }
    }
Esempio n. 13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["FY"] != null)
        {
            strFY = Session["FY"].ToString();
        }
        else
        {
            Session.Clear();
        }

        if (!Page.IsPostBack)
        {
            ddlSDZone.Focus();

            ddlSDZone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(0, "SDZone");
            ddlSDZone.DataBind();
            ddlSDZone.Items.Insert(0, new ListItem("-Select Super Duper Zone-", "0"));

            DDLsuperzone.Focus();
            setdefaultdate();
        }
    }
Esempio n. 14
0
 protected void txtDepCode_TextChanged(object sender, EventArgs e)
 {
     {
         try
         {
             string Departmentcode = txtDepCode.Text.Trim().Split(Constants.splitseperator)[0].ToString().Trim();
             bool   Auth           = Masters.GetCodeValidation("department", Departmentcode);
             if (Auth)
             {
                 DDLsuperzone.Focus();
             }
             else
             {
                 MessageBox("Deparment Code does not Exist");
                 txtDepCode.Text = "";
                 txtDepCode.Focus();
             }
         }
         catch
         {
         }
     }
 }
 public void fillzones()
 {
     DDLsuperzone.DataSource = TargetMaster.Get_Employee_onUserLogin(EmpCode, "Target");
     DDLsuperzone.DataBind();
     DDLsuperzone.Items.Insert(0, new ListItem("-- Select --", "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();
            }
            //Response.Write(strFY);
        }
        if (!Page.IsPostBack)
        {
            BindSuperZone();
            RdbtnSelect.Focus();

            //lblbk.Visible = false;
            //txtbkcod.Visible = false;

            lblbkt.Visible    = false;
            txtbktype.Visible = false;
        }
        if (IsPostBack)
        {
            if (RdbtnSelect.SelectedValue == "Bookwise")
            {
                DDLsuperzone.Focus();

                lblbk.Visible    = true;
                txtbkcod.Visible = true;

                lblbkt.Visible    = false;
                txtbktype.Visible = false;

                if (txtfromDate.Text != "" || txttoDate.Text != "")
                {
                    getdata();
                }
            }
            if (RdbtnSelect.SelectedValue == "BookTypewise")
            {
                DDLsuperzone.Focus();

                lblbk.Visible    = false;
                txtbkcod.Visible = false;

                lblbkt.Visible    = true;
                txtbktype.Visible = true;

                if (txtfromDate.Text != "" || txttoDate.Text != "")
                {
                    getdata();
                }
            }
        }
    }
    public void getdata()
    {
        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);
        int SupID = Convert.ToInt32(DDLsuperzone.SelectedValue);

        if (fdate > tdate)
        {
            MessageBox("From Date is Greater than ToDate");
            txtfromDate.Focus();
        }
        else
        {
            if (RdbtnSelect.SelectedValue == "Bookwise")
            {
                string    Bookcode = txtbkcod.Text.ToString().Split(':')[0].Trim();
                DataTable dt       = new DataTable();
                dt = Books.Get_Bookwise_ZonalDetail(Convert.ToInt32(DDLsuperzone.SelectedValue), fdate, tdate, Bookcode, Convert.ToInt32(strFY)).Tables[0];

                if (dt.Rows.Count > 0)
                {
                    ReportDocument CR = new ReportDocument();
                    CR.Load(Server.MapPath("Report/Bookwise_ZonalDetail.rpt"));

                    CR.SetDataSource(dt);
                    CrptBkwiseZonald.ReportSource = CR;
                }
                else
                {
                    MessageBox("No Records Found");
                    DDLsuperzone.Focus();
                }

                //  txtbkcod.Text = "";
                //  txtbktype.Text = "";
                //   DDLsuperzone.SelectedIndex = 0;
            }
            if (RdbtnSelect.SelectedValue == "BookTypewise")
            {
                string    BookTypecode = txtbktype.Text.ToString().Split(':')[0].Trim();
                DataTable dt1          = new DataTable();
                dt1 = Books.Get_Booktypewise_ZonalDetail(Convert.ToInt32(DDLsuperzone.SelectedValue), fdate, tdate, BookTypecode, Convert.ToInt32(strFY)).Tables[0];

                if (dt1.Rows.Count > 0)
                {
                    ReportDocument CR = new ReportDocument();
                    CR.Load(Server.MapPath("Report/Booktypewise_ZonalDetail.rpt"));

                    CR.SetDataSource(dt1);
                    CrptBkwiseZonald.ReportSource = CR;

                    //  txtbkcod.Text = "";
                    //  txtbktype.Text = "";
                    //  DDLsuperzone.SelectedIndex = 0;
                }
                else
                {
                    if (txtbktype.Text == "")
                    {
                        MessageBox("Enter Book Type");
                        txtbktype.Focus();
                    }
                    else
                    {
                        MessageBox("No Records Found");
                        RdbtnSelect.Focus();

                        //      txtbkcod.Text = "";
                        //     txtbktype.Text = "";
                        //     DDLsuperzone.SelectedIndex = 0;
                    }
                }
            }
        }
    }
Esempio n. 18
0
    protected void grdEmpDetails_RowEditing(object sender, GridViewEditEventArgs e)
    {
        try
        {
            pnlEmployeeDetails.Visible = false;
            Panel1.Visible             = true;
            btnSavE.Visible            = false;
            filter.Visible             = false;

            txtempCode.Text = ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("lblEmpcode")).Text;
            //DDLsuperzone.DataSource = SuperZone.GetSuperzonemaster();
            //DDLsuperzone.DataBind();
            // DDLsuperzone.Items.Insert(0, new ListItem("--Select SuperZone--", "0"));
            //
            DDLSDZone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(0, "SDZone");
            DDLSDZone.DataBind();
            DDLSDZone.Items.Insert(0, new ListItem("All", "0"));


            DDLstate.DataSource = Customer_cs.Get_DestinationMaster("state");
            DDLstate.DataBind();
            DDLstate.Items.Insert(0, new ListItem("--Select State--", "0"));
            //
            pnlEmployeeDetails.Visible = false;
            Panel1.Visible             = true;
            LblEmpID.Text  = ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("lblEID")).Text;
            txtFname.Text  = ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("lblFName")).Text;
            txtMname.Text  = ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("lblMiddleName")).Text;
            txtLname.Text  = ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("LblLastName")).Text;
            Rdogender.Text = ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("LblGender")).Text;
            txtDob.Text    = ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("LblDOB")).Text;
            //
            txtphne1.Text   = ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("LblPhone1")).Text;
            txtphne2.Text   = ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("LblPhone2")).Text;
            txtzipCode.Text = ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("LblZip")).Text;
            txtEmail.Text   = ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("LblEmailID")).Text;
            txtAdd.Text     = ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("LblAddress")).Text;

            ///
            DDLSDZone.SelectedValue = ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("LblSDZoneId")).Text;
            DDLsuperzone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(Convert.ToInt32(DDLSDZone.SelectedValue.ToString()), "SuperZone1");
            DDLsuperzone.DataBind();
            DDLsuperzone.Items.Insert(0, new ListItem("All", "0"));
            ///
            //
            DDLsuperzone.SelectedValue = ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("lblSuperZoneID")).Text;
            DDLzone.DataSource         = Masters.Get_AreaZone_Zone_SuperZone(Convert.ToInt32(DDLsuperzone.SelectedValue.ToString()), "Zone");
            DDLzone.DataBind();
            DDLzone.Items.Insert(0, new ListItem("All", "0"));
            DDLzone.Enabled = true;

            ////
            DDLzone.SelectedValue  = ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("lblZoneID")).Text;
            DDLareazone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(Convert.ToInt32(DDLzone.SelectedValue.ToString()), "AreaZone");
            DDLareazone.DataBind();
            DDLareazone.Items.Insert(0, new ListItem("All", "0"));
            DDLareazone.Enabled = true;
            ////
            DDLareazone.SelectedValue = ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("lblAreaZoneID")).Text;
            Chkarea.DataSource        = Masters.Get_AreaZone_Zone_SuperZone(Convert.ToInt32(DDLareazone.SelectedValue.ToString()), "Area");
            Chkarea.DataBind();
            Chkarea.Items.Insert(0, new ListItem("All", "0"));
            Chkarea.Enabled = true;
            selectArea(Convert.ToInt32(LblEmpID.Text.Trim()));
            //Chkarea.SelectedValue = ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("lblAreaID")).Text;

            txtDepCode.Text = ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("lblDeptId")).Text;
            string JoinDate        = ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("LblJoinDate")).Text;
            string ResignationDate = ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("LblResignationDate")).Text;
            Chekacv.Checked = ((CheckBox)grdEmpDetails.Rows[e.NewEditIndex].FindControl("chkisActive")).Checked;
            txtjoin.Text    = JoinDate;
            txtResign.Text  = ResignationDate;

            DDLstate.SelectedValue = ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("lblState")).Text;


            DDLcity.DataSource = Customer_cs.Get_DestinationMaster(DDLstate.SelectedValue.ToString());
            DDLcity.DataBind();
            DDLcity.Items.Insert(0, new ListItem("--Select City--", "0"));
            DDLcity.Enabled = true;
            DDLcity.Focus();

            // DDLcity.DataSource = Customer_cs.Get_DestinationMaster(DDLstate.SelectedValue.ToString());
            // DDLcity.DataBind();
            // DDLcity.Items.Insert(0, new ListItem("--Select City--", "0"));
            // DDLcity.Enabled = true;


            DDLcity.SelectedItem.Text = ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("LblCity")).Text;
            imgprof.ImageUrl          = "../Images/profileimg/" + ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("lblphoto")).Text;
            lblImage.Text             = ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("lblphoto")).Text;

            ddlqulification.Text = ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("LblQualification")).Text;
            fillQualification();
            DDlDesignation.Text = ((Label)grdEmpDetails.Rows[e.NewEditIndex].FindControl("LblDesignation")).Text;
            fillDesignation();
        }
        catch
        {
        }
    }