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")); }
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; }
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(); }
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"); } } }
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 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(); } }
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 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 { } } }
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(); } }
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; } } } } }