Ejemplo n.º 1
0
    protected void grdBankDetails_RowEditing(object sender, GridViewEditEventArgs e)
    {
        try
        {
            pnlBank.Visible = false;
            Panel1.Visible  = true;
            btnsave.Visible = true;
            filter.Visible  = false;

            txtbankCode.Text    = ((Label)grdBankDetails.Rows[e.NewEditIndex].FindControl("lblBnkCode")).Text;
            DDLstate.DataSource = Customer_cs.Get_DestinationMaster("state");
            DDLstate.DataBind();
            DDLstate.Items.Insert(0, new ListItem("--Select State--", "0"));
            DDLstate.Enabled = true;
            //
            pnlBank.Visible        = false;
            Panel1.Visible         = true;
            lblBankId.Text         = ((Label)grdBankDetails.Rows[e.NewEditIndex].FindControl("lblbankID")).Text;
            txtbankName.Text       = ((Label)grdBankDetails.Rows[e.NewEditIndex].FindControl("lblBnkName")).Text;
            txtbDesc.Text          = ((Label)grdBankDetails.Rows[e.NewEditIndex].FindControl("lblbankdecp")).Text;
            txtcountry.Text        = ((Label)grdBankDetails.Rows[e.NewEditIndex].FindControl("lblcountry")).Text;
            DDLCity.SelectedValue  = ((Label)grdBankDetails.Rows[e.NewEditIndex].FindControl("lblcity")).Text;
            DDLstate.SelectedValue = ((Label)grdBankDetails.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;
            chekactive.Checked = ((CheckBox)grdBankDetails.Rows[e.NewEditIndex].FindControl("chkactive")).Checked;
        }
        catch
        {
        }
    }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         lblBankId.Visible = false;
         Panel1.Visible    = true;
         BindGvBankDetails();
         DDLstate.DataSource = Customer_cs.Get_DestinationMaster("state");
         DDLstate.DataBind();
         DDLstate.Items.Insert(0, new ListItem("--Select State--", "0"));
         SetView();
     }
 }
Ejemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            LblEmpID.Visible   = false;
            DdlRole.DataSource = Rolemaster.Get_RoleMaster();
            DdlRole.DataBind();
            fillQualification();
            fillDesignation();
            PnlLoginDetails.Visible  = false;
            grdEmpDetails.DataSource = BindGvEmpDetail();
            grdEmpDetails.DataBind();
            //

            // DDLsuperzone.DataSource = SuperZone.GetSuperzonemaster();
            //  DDLsuperzone.DataBind();
            DDLSDZone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(0, "SDZone");
            DDLSDZone.DataBind();
            DDLSDZone.Items.Insert(0, new ListItem("All", "0"));
            DDLsuperzone.Items.Insert(0, new ListItem("All", "0"));
            DDLzone.Items.Insert(0, new ListItem("All", "0"));
            DDLareazone.Items.Insert(0, new ListItem("All", "0"));
            // DDLarea.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"));
            DDLcity.Items.Insert(0, new ListItem("--Select City--", "0"));
            SetView();



            //

            txtjoin.Text   = DateTime.Now.ToString("dd/MM/yyyy");
            txtResign.Text = "30/01/2050";
            EmpId();
        }
        else
        {
        }
    }
Ejemplo n.º 4
0
        private void attachDDL(int id)
        {
            list l = BLL.BLL.getCommand(id);

            ArrayList     yearList           = new ArrayList();
            ArrayList     dayList            = new ArrayList();
            List <string> monthList          = months.ToList();
            ArrayList     hourList           = new ArrayList();
            ArrayList     minutesSecondsList = new ArrayList();

            for (int i = 1; i < 99; i++)
            {
                yearList.Add(i + 2000);
                if (i <= 30)
                {
                    dayList.Add(i);
                }
                if (i <= 24)
                {
                    hourList.Add(i - 1);
                }
                if (i <= 60)
                {
                    minutesSecondsList.Add(i - 1);
                }
            }


            DDLyear.DataSource    = yearList;
            DDLyear.SelectedValue = l.time.Year.ToString();
            DDLyear.DataBind();

            DDLmonth.DataSource    = monthList;
            DDLmonth.SelectedValue = months[l.time.Month - 1];
            DDLmonth.DataBind();


            DDLday.DataSource    = dayList;
            DDLday.SelectedValue = l.time.Day.ToString();
            DDLday.DataBind();

            DDLhour.DataSource    = hourList;
            DDLhour.SelectedValue = l.time.Hour.ToString();
            DDLhour.DataBind();


            DDLminute.DataSource    = minutesSecondsList;
            DDLminute.SelectedValue = l.time.Minute.ToString();
            DDLminute.DataBind();

            DDLsecond.DataSource    = minutesSecondsList;
            DDLsecond.SelectedValue = l.time.Second.ToString();
            DDLsecond.DataBind();

            ArrayList states = new ArrayList();

            states.Add("ON");
            states.Add("OFF");
            DDLstate.DataSource    = states;
            DDLstate.SelectedValue = l.state ? "ON" : "OFF";
            DDLstate.DataBind();
        }
Ejemplo n.º 5
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
        {
        }
    }