public void BindSuperZone() { DDLsuperzone.DataSource = SuperZone.GetSuperzonemaster(); DDLsuperzone.DataBind(); DDLsuperzone.Items.Insert(0, new ListItem("-Select SuperZone-", "0")); DDLzone.Items.Insert(0, new ListItem("-Select Zone-", "0")); DDLareazone.Items.Insert(0, new ListItem("-Select AreaZone-", "0")); DDLarea.Items.Insert(0, new ListItem("-Select Area-", "0")); }
public DataView BindGvSuperZoneDetail() { DataTable dt = new DataTable(); dt = SuperZone.GetSuperzonemaster(); DataView dv = new DataView(dt); return(dv); }
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")); }
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 { } } }
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")); } }
protected void btnSave_Click(object sender, EventArgs e) { SuperZone _objSzm = new SuperZone(); _objSzm.SuperZoneID = Convert.ToInt32(lblID.Text); _objSzm.SuperZoneCode = txtSZCode.Text.Trim(); _objSzm.SuperZoneName = txtSZName.Text.Trim(); _objSzm.SDZoneID = Convert.ToInt32(DDLSDZone.SelectedValue); _objSzm.SEmailID = Txtsemail.Text.ToString(); _objSzm.IsActive = Chekacv.Checked; try { _objSzm.Save(); MessageBox("Record saved successfully"); grdSuperZoneDetails.DataSource = BindGvSuperZoneDetail(); grdSuperZoneDetails.DataBind(); if (btnSave.Text == "Update") { pnlSuperZoneDetails.Visible = true; pnlSuperZone.Visible = false; btnSave.Visible = false; btnSave.Text = "Save"; txtSZCode.Enabled = true; filter.Visible = true; } else { pnlSuperZoneDetails.Visible = false; pnlSuperZone.Visible = true; txtSZCode.Text = ""; txtSZName.Text = ""; Txtsemail.Text = ""; txtSZCode.Focus(); } } catch { } }
protected void grdSuperZoneDetails_RowDeleting(object sender, GridViewDeleteEventArgs e) { SuperZone _objSZM = new SuperZone(); _objSZM.SuperZoneID = Convert.ToInt32(((Label)grdSuperZoneDetails.Rows[e.RowIndex].FindControl("lblSZID")).Text); _objSZM.SuperZoneCode = ((Label)grdSuperZoneDetails.Rows[e.RowIndex].FindControl("lblSZCode")).Text; _objSZM.SuperZoneName = ((Label)grdSuperZoneDetails.Rows[e.RowIndex].FindControl("lblSZName")).Text; _objSZM.IsActive = Convert.ToBoolean(false); _objSZM.IsDeleted = Convert.ToBoolean(true); try { _objSZM.Save(); MessageBox("Your record is Deleted"); grdSuperZoneDetails.DataSource = BindGvSuperZoneDetail(); grdSuperZoneDetails.DataBind(); pnlSuperZoneDetails.Visible = true; pnlSuperZone.Visible = false; } catch { } }
public void GetSuperZone() { usergrid.DataSource = SuperZone.GetSuperzonemaster(); usergrid.DataBind(); }
public void BindSuperZone() { DDLsuperzone.DataSource = SuperZone.GetSuperzonemaster(); DDLsuperzone.DataBind(); DDLsuperzone.Items.Insert(0, new ListItem("-All Super Zone-", "0")); }
public void GetSuperZone() { DDLsuperzone.DataSource = SuperZone.GetSuperzonemaster(); DDLsuperzone.DataBind(); // DDLsuperzone.Items.Insert(0, new ListItem("--Select SuperZone--", "0")); }