protected void DDLareazone_SelectedIndexChanged(object sender, EventArgs e) { Chkarea.DataSource = Masters.Get_AreaZone_Zone_SuperZone(Convert.ToInt32(DDLareazone.SelectedValue.ToString()), "Area"); Chkarea.DataBind(); Chkarea.Items.Insert(0, new ListItem("All", "0")); //DDLarea.Enabled = true; Chkarea.Focus(); }
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 { } }