protected void DDLstate_SelectedIndexChanged(object sender, EventArgs e) { DDLCity.DataSource = Customer_cs.Get_DestinationMaster(DDLstate.SelectedValue.ToString()); DDLCity.DataBind(); DDLCity.Items.Insert(0, new ListItem("--Select City--", "0")); DDLCity.Enabled = true; }
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 { } }
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(); } }
protected void DDLstate_SelectedIndexChanged(object sender, EventArgs e) { if (DDLstate.SelectedValue == "0") { DDLcity.Items.Clear(); //rajnish DDLcity.Items.Insert(0, new ListItem("--Select City--", "0")); //rajnish } else { DDLcity.DataSource = Customer_cs.Get_DestinationMaster(DDLstate.SelectedValue.ToString()); DDLcity.DataBind(); DDLcity.Items.Insert(0, new ListItem("--Select City--", "0")); //DDLcity.Items.Insert(0, new ListItem("--Select City--", "0")); DDLcity.Enabled = true; DDLcity.Focus(); } }
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 { } }
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 { } }