public void BindPanel() { RdBValue = RdlView.SelectedValue.ToString(); if (RdBValue == "Customer") { BindCustomer(); Pnldeldate.Visible = false; pnlcity.Visible = false; Pnlcust.Visible = true; pnlDetails.Visible = false; Rptrpending.Visible = true; upOrderNO.Update(); pnlconfirm.Visible = false; // DDLCustomer.Items.Insert(0, new ListItem("- Select Customer-", "0")); } if (RdBValue == "DeliveryDate") { Pnldeldate.Visible = true; pnlcity.Visible = false; Pnlcust.Visible = false; pnlDetails.Visible = false; Rptrpending.Visible = true; upOrderNO.Update(); pnlconfirm.Visible = false; txtFromDate.Text = DateTime.Today.AddDays(-1).ToString("dd/MM/yyyy"); txttoDate.Text = DateTime.Today.ToString("dd/MM/yyyy"); } if (RdBValue == "All") { Pnldeldate.Visible = false; pnlcity.Visible = false; Pnlcust.Visible = false; Rptrpending.Visible = true; //Rptrpending.DataSource = DCMaster.Get_Pending_DocNo(); Rptrpending.DataSource = DCMaster.Get_Pending_DocNo(Convert.ToInt32(strFY)); Rptrpending.DataBind(); upOrderNO.Update(); // Bind_DDL_SuperZone(); pnlconfirm.Visible = true; pnlDetails.Visible = false; } if (RdBValue == "City") { Pnldeldate.Visible = false; pnlcity.Visible = true; Pnlcust.Visible = false; pnlconfirm.Visible = false; pnlDetails.Visible = false; Rptrpending.Visible = true; upOrderNO.Update(); DDlstate.DataSource = Destination.GetDestination(Convert.ToString("state")); DDlstate.DataBind(); DDlstate.Items.Insert(0, new ListItem("--Select State--", "0")); DDlCity.Items.Clear(); DDlCity.Items.Insert(0, new ListItem("--Select City--", "0")); } }
protected void DDlstate_SelectedIndexChanged(object sender, EventArgs e) { if (DDlstate.SelectedValue != "0") { DDlCity.Items.Clear(); // DDlCity.DataSource = Destination.GetDestination(Convert.ToString(DDlstate.SelectedValue)); DDlCity.DataSource = DCMaster.Get_Customer_PendingDocNo("city@" + DDlstate.SelectedValue.ToString(), Convert.ToInt32(strFY)); DDlCity.DataBind(); DDlCity.Items.Insert(0, new ListItem("--Select City--", "0")); Rptrpending.DataSource = DCMaster.GetPendingDocNo_ForView(Convert.ToInt32(DDlstate.SelectedValue), "City", Convert.ToDateTime("1/11/2001"), Convert.ToDateTime("1/12/2001"), Convert.ToInt32(strFY)); Rptrpending.DataBind(); if (Rptrpending.Items.Count > 0) { pnlconfirm.Visible = true; Rptrpending.Visible = true; upOrderNO.Update(); pnlDetails.Visible = false; } else { pnlconfirm.Visible = false; Rptrpending.Visible = false; upOrderNO.Update(); pnlDetails.Visible = false; } if (DDlCity.Items.Count > 0) { DDlCity.Focus(); } else { DDlstate.Focus(); } } else { DDlCity.DataBind(); DDlCity.Focus(); } }