protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { objCommonClass.BindRegion(ddlRegion); objCCCMaster.BindBranchCode(ddlBranch); objCommonClass.BindUnitSno(ddlProductDivison); objCommonClass.BindDataGrid(gvComm, "uspMisDetail", true); } System.Threading.Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"])); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { objCommonClass.BindRegion(ddlRegion); //objCCCMaster.BindBranchCode(ddlBranch); objCommonClass.BindUnitSno(ddlProductDivison); objCommonClass.BindDataGrid(gvComm, "uspMisDetail", true, sqlParamSrh, lblRowCount); ViewState["Column"] = "Complaint_RefNo"; ViewState["Order"] = "ASC"; } System.Threading.Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"])); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { objCommonMIS.BindRegion(ddlRegion); objCommonMIS.BindProductDivision(ddlProductDivison); } else { if (DateTime.Now.Month <= 3) { year = year - 1; } } }
protected void Page_Load(object sender, EventArgs e) { sqlParamSrh[3].Value = int.Parse(rdoboth.SelectedValue); if (!Page.IsPostBack) { //Filling Countries to grid of calling BindDataGrid of CommonClass objCommonClass.BindDataGrid(gvComm, "uspStateMaster", true, sqlParamSrh, lblRowCount); objCommonClass.BindCountry(ddlCountry); objCommonClass.BindRegion(ddlRegion); imgBtnUpdate.Visible = false; ViewState["Column"] = "State_Code"; ViewState["Order"] = "ASC"; } System.Threading.Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"])); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { //Filling Dealer to grid of calling BindDataGrid of CommonClass objCommonClass.BindDataGrid(gvComm, "[uspDealerMaster]", true, sqlParamSrh); imgBtnUpdate.Visible = false; objCommonClass.BindCountry(ddlCountryCode); objCommonClass.BindRegion(ddlRegion); ddlCityCode.Items.Insert(0, "Select"); ddlStateCode.Items.Insert(0, "Select"); ddlBranch.Items.Insert(0, "Select"); } System.Threading.Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"])); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { string[] names; int countElements; names = Enum.GetNames(typeof(MyMnthP)); for (countElements = 0; countElements <= names.Length - 1; countElements++) { ddlMonth.Items.Add(new ListItem(names[countElements], countElements.ToString())); } // Initilizise the default values ddlMonth.Items[1].Selected = true; Ddlyear.Items.FindByText(DateTime.Today.Year.ToString()).Selected = true; objCommonMIS.BindRegion(ddlRegion); ddlRegion.Items[0].Value = "0"; ddlRegion.Items[0].Text = "All"; } }
//method to select data on edit private void BindSelected(int intUnitSNo) { lblMessage.Text = ""; txtUnit.Enabled = false; objUnitMaster.BindUnitOnSNo(intUnitSNo, "SELECT_ON_UNIT_SNO"); //ddlCompany.SelectedValue = Convert.ToString(objUnitMaster.CompanySNo); for (int intCnt = 0; intCnt < ddlCompany.Items.Count; intCnt++) { if (ddlCompany.Items[intCnt].Value.ToString() == objUnitMaster.CompanySNo.ToString()) { ddlCompany.SelectedIndex = intCnt; } } txtUnit.Text = objUnitMaster.UnitCode; txtUnitDesc.Text = objUnitMaster.UnitDesc; txtSapLocCode.Text = objUnitMaster.SapLocCode; txtUnitAbbr.Text = objUnitMaster.UnitAbbr; // ddlUnitType.SelectedValue = Convert.ToString(objUnitMaster.UnitTypeSNo); for (int intCnt = 0; intCnt < ddlUnitType.Items.Count; intCnt++) { if (ddlUnitType.Items[intCnt].Value.ToString() == objUnitMaster.UnitTypeSNo.ToString()) { ddlUnitType.SelectedIndex = intCnt; } } if (ddlUnitType.SelectedValue == "1") { objCommonClass.BindBusinessArea(ddlBusArea); for (int intCnt = 0; intCnt < ddlBusArea.Items.Count; intCnt++) { if (ddlBusArea.Items[intCnt].Value.ToString() == objUnitMaster.BARSNo.ToString()) { ddlBusArea.SelectedIndex = intCnt; } } //ddlBusArea.SelectedValue = Convert.ToString(objUnitMaster.BARSNo); hdnIsBA.Value = "B"; ddlDealingBrh.Enabled = false; //ddlDealingBrh.Items.Clear(); ReqDealingBrh.Enabled = false; } else { objCommonClass.BindRegion(ddlBusArea); for (int intCnt = 0; intCnt < ddlBusArea.Items.Count; intCnt++) { if (ddlBusArea.Items[intCnt].Value.ToString() == objUnitMaster.BARSNo.ToString()) { ddlBusArea.SelectedIndex = intCnt; } } //ddlBusArea.SelectedValue = Convert.ToString(objUnitMaster.BARSNo); ReqDealingBrh.Enabled = false; ddlDealingBrh.Enabled = false; //ddlDealingBrh.Items.Clear(); hdnIsBA.Value = "R"; } if (ddlUnitType.SelectedValue == "3") { objCommonClass.BindBranch(ddlDealingBrh); for (int intCnt = 0; intCnt < ddlDealingBrh.Items.Count; intCnt++) { if (ddlDealingBrh.Items[intCnt].Value.ToString() == objUnitMaster.DealBrhCode.ToString()) { ddlDealingBrh.SelectedIndex = intCnt; } } //ddlDealingBrh.SelectedValue = Convert.ToString(objUnitMaster.DealBrhCode); ReqDealingBrh.Enabled = true; ddlDealingBrh.Enabled = true; } txtWarrFManuf.Text = Convert.ToString(objUnitMaster.WFManufacture); txtWarrFPurchase.Text = Convert.ToString(objUnitMaster.WFPurchase); txtVistCharge.Text = Convert.ToString(objUnitMaster.VisitCharge); txtAdd1.Text = objUnitMaster.Address1; txtAdd2.Text = objUnitMaster.Address2; txtAdd3.Text = objUnitMaster.Address3; //ddlCountry.SelectedValue = Convert.ToString(objUnitMaster.CountrySNo); for (int intCnt = 0; intCnt < ddlCountry.Items.Count; intCnt++) { if (ddlCountry.Items[intCnt].Value.ToString() == objUnitMaster.CountrySNo.ToString()) { ddlCountry.SelectedIndex = intCnt; } } if (ddlCountry.SelectedIndex != 0) { objCommonClass.BindState(ddlState, int.Parse(ddlCountry.SelectedValue.ToString())); //ddlState.SelectedValue = Convert.ToString(objUnitMaster.StateSNo); for (int intCnt = 0; intCnt < ddlState.Items.Count; intCnt++) { if (ddlState.Items[intCnt].Value.ToString() == objUnitMaster.StateSNo.ToString()) { ddlState.SelectedIndex = intCnt; } } } if (ddlState.SelectedIndex != 0) { objCommonClass.BindCity(ddlCity, int.Parse(ddlState.SelectedValue.ToString())); //ddlCity.SelectedValue = Convert.ToString(objUnitMaster.CitySNo); for (int intCnt = 0; intCnt < ddlCity.Items.Count; intCnt++) { if (ddlCity.Items[intCnt].Value.ToString() == objUnitMaster.CitySNo.ToString()) { ddlCity.SelectedIndex = intCnt; } } } txtPinCode.Text = objUnitMaster.PinCode; txtPhone.Text = objUnitMaster.Phone; txtMobile.Text = objUnitMaster.Mobile; txtFax.Text = objUnitMaster.Fax; txtEmail.Text = objUnitMaster.Email; // Code for selecting Status as in database for (intCnt = 0; intCnt < rdoStatus.Items.Count; intCnt++) { if (rdoStatus.Items[intCnt].Value.ToString().Trim() == objUnitMaster.ActiveFlag.ToString().Trim()) { rdoStatus.Items[intCnt].Selected = true; } else { rdoStatus.Items[intCnt].Selected = false; } } }