protected void Page_Load(object sender, EventArgs e) { if (Session["ChetanaCompanyName"] != null) { if (Session["FY"] != null) { if (!Page.IsPostBack) { strChetanaCompanyName = Session["ChetanaCompanyName"].ToString(); strFY = Session["FY"].ToString(); UserName = Session["UserName"].ToString(); Cust_AutoCompleteExtender.ContextKey = "custz" + "!" + Session["UserName"].ToString(); //txtOrderRecdDate.Text = System.DateTime.Now.ToString("dd/MM/yyyy"); //txtOrderRecdDate.Focus(); txtCustCode.Focus(); string grp = "Transport"; txtTransport.DataSource = Masterofmaster.Get_MasterOfMaster_ByGroup_ForDropdown(grp, "DropDown"); txtTransport.DataBind(); txtTransport.Items.Insert(0, new ListItem("-Select Transporter-", "0")); } } else { Session.Clear(); } } }
public void BindDDL() { string grp = "BookSet"; DDLSet.DataSource = Masterofmaster.Get_MasterOfMaster_ByGroup_ForDropdown(grp, "DropDown"); DDLSet.DataBind(); }
// Bind Dropdown : Transport Details. public void BindDDlTransport() { string grp = "Transport"; DDlTransport.DataSource = Masterofmaster.Get_MasterOfMaster_ByGroup_ForDropdown(grp, "DropDown"); DDlTransport.DataBind(); DDlTransport.Items.Insert(0, new ListItem("-Select Transporter-", "none")); }
public void BindBooktype() { string grp = "BookType"; DDlBooktype.DataSource = Masterofmaster.Get_MasterOfMaster_ByGroup_ForDropdown(grp, "DropDown"); DDlBooktype.DataBind(); DDlBooktype.Items.Insert(0, new ListItem("-Select book set-", "0")); }
public void BindDDLstd() { string std = "Standard"; DDLstandard.DataSource = Masterofmaster.Get_MasterOfMaster_ByGroup_ForDropdown(std, "DropDown"); DDLstandard.DataBind(); DDLstandard.Items.Insert(0, new ListItem("-STD-", "0")); }
public void fillddlVat() { DataSet ds = Masterofmaster.Get_MasterOfMaster_ByGroup_ForDropdown("pvm", ddlmsoms.SelectedValue.ToString()); ddlVat.DataSource = ds; ddlVat.DataBind(); //ddlvatText.DataSource = ds; //ddlvatText.DataBind(); }
protected void txtTransporter_TextChanged(object sender, EventArgs e) { try { if (txttransporter.Text != "") { string TransCode = txttransporter.Text.ToString().Split(':', '[', ']')[0].Trim(); flag1 = txttransporter.Text.ToString().Split('[', ']')[1].Trim(); txttransporter.Text = TransCode; // ACExttransporter.ContextKey = TransCode; if (flag1 == "Trans") { lbltransporter.Visible = true; DataTable dt = new DataTable(); dt = Masterofmaster.Get_MasterOfMaster_ByGroup_ForDropdown("Transport", TransCode).Tables[0]; if (dt.Rows.Count != 0) { // txttransporter.Text = TransCode; if (flag1 == "Trans") { lbltransporter.Text = dt.Rows[0]["Value"].ToString(); lblTransID.Text = dt.Rows[0]["AutoID"].ToString(); txtNoOfBund.Focus(); } } else { lbltransporter.Text = "No such record found"; txttransporter.Focus(); txttransporter.Text = ""; } // Bind_DDL_Transport(); } else { lbltransporter.Visible = false; lbltransporter.Text = flag1; //lbltransporter.Text = ""; } } else { lbltransporter.Text = "No such record found"; txttransporter.Text = ""; } } catch (Exception ex) { txttransporter.Text = ex.Message.ToString(); //lbltransporter.Text = "No such record found"; } }
public void callTextChange() { string CustCode = txtCust.Text.ToString().Split(':')[0].Trim(); DataTable dt = new DataTable(); if (rdoview.Items[0].Selected == true) { dt = DCMaster.Get_Name(CustCode, "Customer").Tables[0]; if (dt.Rows.Count != 0) { if (Convert.ToString(dt.Rows[0]["BlackList"]).ToLower() != "true") { lblCustomer.Text = Convert.ToString(dt.Rows[0]["CustName"]); txtCust.Text = CustCode; lblCustID.Text = Convert.ToString(dt.Rows[0]["CustID"]); txtCust.Focus(); } else { lblCustomer.Text = "Customer is blacklisted"; txtCust.Focus(); txtCust.Text = ""; } } else { lblCustomer.Text = "No such record found"; txtCust.Focus(); txtCust.Text = ""; } } else if (rdoview.Items[2].Selected == true) { dt = Masterofmaster.Get_MasterOfMaster_ByGroup_ForDropdown("Transport", CustCode).Tables[0]; if (dt.Rows.Count != 0) { // txttransporter.Text = TransCode; lblCustomer.Text = dt.Rows[0]["Key"].ToString() + "::" + dt.Rows[0]["Value"].ToString(); lblCustID.Text = dt.Rows[0]["AutoID"].ToString(); } else { lblCustomer.Text = "No such record found"; txtCust.Focus(); txtCust.Text = ""; } } }
//} protected void gvPayment_RowDataBound(object sender, GridViewRowEventArgs e) { DropDownList ddlGivenFrom;// = (DropDownList)sender; if (e.Row.RowType == DataControlRowType.DataRow) { ddlGivenFrom = (DropDownList)e.Row.FindControl("ddlGivenFrom"); DataView dv = new DataView(Masterofmaster.Get_MasterOfMaster_ByGroup_ForDropdown("GivenFrom", "DropDown").Tables[0]); ddlGivenFrom.DataSource = dv; ddlGivenFrom.DataBind(); ddlGivenFrom.Items.Insert(0, new ListItem("Select", "0")); } }
protected void Page_Load(object sender, EventArgs e) { SetView(); if (!Page.IsPostBack) { DDLexpensetype.DataSource = Masterofmaster.Get_MasterOfMaster_ByGroup_ForDropdown("ExpenseType", "DropDown"); DDLexpensetype.DataBind(); DDLexpensetype.Items.Insert(0, new ListItem("--Select Type--", "0")); ddlexpensegroup.DataSource = Masterofmaster.Get_MasterOfMaster_ByGroup_ForDropdown("ExpenseGroup", "DropDown"); ddlexpensegroup.DataBind(); ddlexpensegroup.Items.Insert(0, new ListItem("--Select Group--", "0")); BindgrdExpense(); lblID.Text = "0"; } }
public DataTable fillTempBookData(string Cust) { DataTable dt = new DataTable(); if (rdoview.Items[0].Selected == true) { DataTable dt1 = DCMaster.Get_Name(Cust, "Customer").Tables[0]; if (Session["getpasstempdata"] == null) { //CREATE NEW DATATABLE dt.Columns.Add("SCHL_ID"); dt.Columns.Add("SCHL_NAME"); dt.Columns.Add("SCHL_AREA"); dt.Columns.Add("ID"); } else { dt = (DataTable)Session["getpasstempdata"]; } dt.Rows.Add(dt1.Rows[0]["CustCode"].ToString(), dt1.Rows[0]["CustName"].ToString(), dt1.Rows[0]["AreaName"].ToString(), dt1.Rows[0]["CustID"].ToString()); } else if (rdoview.Items[2].Selected == true) { DataTable dt2 = Masterofmaster.Get_MasterOfMaster_ByGroup_ForDropdown("Transport", Cust).Tables[0]; if (Session["getpasstempdata"] == null) { //CREATE NEW DATATABLE dt.Columns.Add("Transport_ID"); dt.Columns.Add("Transport_Code"); dt.Columns.Add("Transport_Name"); } else { dt = (DataTable)Session["getpasstempdata"]; } dt.Rows.Add(dt2.Rows[0]["AutoID"].ToString(), dt2.Rows[0]["Key"].ToString(), dt2.Rows[0]["Value"].ToString()); } Session["getpasstempdata"] = dt; return(dt); }
protected void Page_Load(object sender, EventArgs e) { if (Session["ChetanaCompanyName"] != "" || Session["ChetanaCompanyName"] != null) { if (Session["FY"] != "" || Session["FY"] != null) { strChetanaCompanyName = Session["ChetanaCompanyName"].ToString(); strFY = Session["FY"].ToString(); } else { Session.Clear(); } //Response.Write(strFY); } if (!Page.IsPostBack) { ViewState["srate"] = ""; SetView(); GetValidation(3, Convert.ToInt32(Session["Role"])); string grp = "BookSet"; DDLSelectSet.DataSource = Masterofmaster.Get_MasterOfMaster_ByGroup_ForDropdown(grp, "DropDown"); DDLSelectSet.DataBind(); DDLSelectSet.Items.Insert(0, new ListItem("-Select book set-", "0")); string std = "Standard"; DDlstandard.DataSource = Masterofmaster.Get_MasterOfMaster_ByGroup_ForDropdown(std, "DropDown"); DDlstandard.DataBind(); DDlstandard.Items.Insert(0, new ListItem("-STD-", "0")); txtdocDate.Text = DateTime.Now.ToString("dd/MM/yyyy"); txtChalDate.Text = DateTime.Now.ToString("dd/MM/yyyy"); txtOrdDate.Text = DateTime.Now.ToString("dd/MM/yyyy"); txtorder.Focus(); Session["tempBookData"] = null; // btncancel.Visible = false; //Session["tempBookData"] = null; } if (add) { btn_Save.Enabled = true; } if (!view) { BtnGetSpecimanDetails.Enabled = false; } }
protected void Page_Load(object sender, EventArgs e) { if (Session["ChetanaCompanyName"] != "" || Session["ChetanaCompanyName"] != null) { if (Session["FY"] != "" || Session["FY"] != null) { strChetanaCompanyName = Session["ChetanaCompanyName"].ToString(); strFY = Session["FY"].ToString(); } else { Session.Clear(); } } if (!Page.IsPostBack) { GetValidation(3, Convert.ToInt32(Session["Role"])); ModalPopUpDocNum.Show(); TxtDocNo.Focus(); string grp = "BookSet"; DDLSelectSet.DataSource = Masterofmaster.Get_MasterOfMaster_ByGroup_ForDropdown(grp, "DropDown"); DDLSelectSet.DataBind(); DDLSelectSet.Items.Insert(0, new ListItem("-Select book set-", "0")); string std = "Standard"; DDLstandard.DataSource = Masterofmaster.Get_MasterOfMaster_ByGroup_ForDropdown(std, "DropDown"); DDLstandard.DataBind(); DDLstandard.Items.Insert(0, new ListItem("-STD-", "0")); // txtdocDate.Text = DateTime.Now.ToString(sDateFormat); txtChalDate.Text = DateTime.Now.ToString(sDateFormat); // txtDeliverydte.Text = DateTime.Now.ToString(sDateFormat); // txtOrdDate.Text = DateTime.Now.ToString(sDateFormat); //txtorder.Focus(); Session["tempDCData"] = null; // Openpopup(2).; // btncancel.Visible = false; //Session["tempDCData"] = null; Bindcustomer(); // DCMaster.Get_Transporter(custcode); lblZoneCode.Visible = false; DDLZone.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { if (Session["FY"] != null) { if (!Page.IsPostBack) { strFY = Session["FY"].ToString(); txtFrom.Focus(); string grp = "Transport"; txtTransport.DataSource = Masterofmaster.Get_MasterOfMaster_ByGroup_ForDropdown(grp, "DropDown"); txtTransport.DataBind(); txtTransport.Items.Insert(0, new ListItem("-Select Transporter-", "0")); } } else { Session.Clear(); } }
protected void txtempc_TextChanged(object sender, EventArgs e) { string ECode = txtempc.Text.Split(Constants.splitseperator)[0].ToString().Trim(); DataTable dt = new DataTable(); dt = Masterofmaster.Get_MasterOfMaster_ByGroup_ForDropdown("Teamdetails", ECode).Tables[0]; if (dt.Rows.Count != 0) { txtempc.Text = ECode; lblEmpName.Text = dt.Rows[0]["Value"].ToString(); txtremark.Focus(); } else { lblEmpName.Text = "No Such Teamfound"; txtempc.Focus(); txtempc.Text = ""; } }
private void GetSBUCode() { ddlSbucode.DataSource = Masterofmaster.Get_MasterOfMaster_ByGroup_ForDropdown("SBU", "DropDown"); ddlSbucode.DataBind(); ddlSbucode.Items.Insert(0, new ListItem("--Seelct SBU Code--", "0")); }
public void FillForm() { try { //DDLareazone.Enabled = true; //DDLarea.Enabled = true; //DDLzone.Enabled = true; //btnSave.Visible = true; PnlAdd.Visible = true; //PnlAdd.Enabled= false; //btnSave.Text = "Update"; //btnSave.Enabled = true; LblCustId.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblCustID")).Text; TxtCustCode.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblCustCode")).Text; TxtShortForm.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblShortForm")).Text; TxtFamilyCode.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblFamilyCode")).Text; TxtAddress.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblAddress")).Text; TxtZip.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblZip")).Text; TxtPhone1.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblPhone1")).Text; TxtPhone2.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblPhone2")).Text; TxtEmailID.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblEmailID")).Text; TxtCustName.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblCustName")).Text; TxtCreditLimit.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblCreditLimit")).Text; TxtPrincipalName.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblPrincipalName")).Text; TxtPrincipalMobile.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblPrincipalMobile")).Text; TxtPrincipalDOB.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblPrincipalDOB")).Text; TxtKeyPersonName.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblKeyPersonName")).Text; TxtKeyPersonMobile.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblKeyPersonMobile")).Text; TxtKeyPersonDOB.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblKeyPersonDOB")).Text; TxtAdditinalDis.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblAdditinalDis")).Text; TxtVIPRemark.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblVIPRemark")).Text; TxtMedium.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblMedium")).Text; ChkIsActive.Checked = ((CheckBox)grdCustDetails.Rows[0].FindControl("chkisActive")).Checked; LblSuperzone.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblSuperZoneID")).Text; Lblzone.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblZoneID")).Text; LblAreazone.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblAreaZoneID")).Text; LblArea.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblAreaID")).Text; LblCustDetailID1.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblCustDetailID")).Text; TxtCustomerType.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblctype")).Text; txtcreditdays.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblcreditdays")).Text; lblrating.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblcustrating")).Text; txtSchAdditionalDis.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblSchAdditionalDis")).Text; txtTODValue1.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblTODValue1")).Text; txtTODValue2.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblTODValue2")).Text; txtTODValue3.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblTODValue3")).Text; txtTODDisc1.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblTODDisc1")).Text; txtTODDisc2.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblTODDisc2")).Text; txtTODDisc3.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblTODDisc3")).Text; TxtblkRemark.Text = ((Label)grdCustDetails.Rows[0].FindControl("Lblblkremark")).Text; TxtblkDate.Text = ((Label)grdCustDetails.Rows[0].FindControl("Lblblkdate")).Text; txtUpperlimit.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblCUL")).Text; txtLowerlimit.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblCLL")).Text; chk_splitdc.Checked = ((CheckBox)grdCustDetails.Rows[0].FindControl("chk_isSplit")).Checked; //ReadMe Comment(Zaid Ansari) Any Problem SBUCode Dropdown Bind Find This Method GetSBUCode() lblSBUCodeNone.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblSUBCode")).Text == "" ? "0" : lblSBUCodeNone.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblSUBCode")).Text; txtPANNo.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblPan")).Text; txtGst.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblGst")).Text; txtStateCode.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblStateCode")).Text; try { //ReadMe Comment(Zaid Ansari)(Dropdown Bind) Super Zone ,State,City,Category Any Problem Find This Method fillzones() ddlSbucode.DataSource = Masterofmaster.Get_MasterOfMaster_ByGroup_ForDropdown("SBU", "DropDown"); ddlSbucode.DataBind(); ddlSbucode.Items.Insert(0, new ListItem("--Seelct SBU Code--", "0")); ddlSbucode.SelectedValue = lblSBUCodeNone.Text; DDLsuperzone.SelectedValue = LblSuperzone.Text; DDLzone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(Convert.ToInt32(LblSuperzone.Text), "Zone"); DDLzone.DataBind(); DDLzone.Items.Insert(0, new ListItem("--Select Zone--", "0")); DDLzone.SelectedValue = Lblzone.Text.Trim(); DDLareazone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(Convert.ToInt32(Lblzone.Text), "AreaZone"); DDLareazone.DataBind(); DDLareazone.Items.Insert(0, new ListItem("--Select AreaZone--", "0")); DDLareazone.SelectedValue = LblAreazone.Text.Trim(); DDLarea.DataSource = Masters.Get_AreaZone_Zone_SuperZone(Convert.ToInt32(LblAreazone.Text), "Area"); DDLarea.DataBind(); DDLarea.Items.Insert(0, new ListItem("--Select Area--", "0")); DDLarea.SelectedValue = LblArea.Text.Trim(); } catch { } ddLStates.DataSource = Destination.GetDestination(flag); ddLStates.DataBind(); ddLStates.Items.Insert(0, new ListItem("--Select State--", "0")); ddLStates.SelectedValue = ((Label)grdCustDetails.Rows[0].FindControl("lblstate1")).Text.Trim(); ddlCity.DataSource = Destination.GetDestination(Convert.ToString(ddLStates.SelectedValue)); ddlCity.DataBind(); ddlCity.Items.Insert(0, new ListItem("--Select City--", "0")); ddlCity.SelectedValue = ((Label)grdCustDetails.Rows[0].FindControl("lblCity")).Text.Trim(); DataView dv1 = new DataView(Masterofmaster.Get_MasterOfMaster_ByGroup("CustRating").Tables[0]); DdlCustRating.DataSource = dv1; DdlCustRating.DataBind(); DdlCustRating.Items.Insert(0, new ListItem("--Select Rating--", "0")); DdlCustRating.SelectedValue = lblrating.Text.Trim(); ChkBlacklist.Checked = ((CheckBox)grdCustDetails.Rows[0].FindControl("ChKBList")).Checked; //lblboardid.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblboardid")).Text; //DDLBoard.DataSource = Masterofmaster.Get_MasterOfMaster_ByGroup("Board").Tables[0]; //DDLBoard.DataBind(); //DDLBoard.Items.Insert(0, new ListItem("--Select Board--", "0")); //DDLBoard.SelectedValue = ((Label)grdCustDetails.Rows[0].FindControl("lblboardid")).Text; txtassociation.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblassociation")).Text; txtcgp.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblcgp")).Text; txtbuisiness.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblbuisiness")).Text; DDLCC.DataSource = CustCategory.GetCustomerCategoryMaster(flag); DDLCC.DataBind(); DDLCC.Items.Insert(0, new ListItem("--Select Category--", "0")); DDLCC.SelectedValue = ((Label)grdCustDetails.Rows[0].FindControl("lblCMID")).Text.Trim(); DDLCSC.DataSource = CustCategory.GetCustomerCategoryMaster(Convert.ToString(DDLCC.SelectedValue)); DDLCSC.DataBind(); DDLCSC.Items.Insert(0, new ListItem("--Select City--", "0")); DDLCSC.SelectedValue = ((Label)grdCustDetails.Rows[0].FindControl("lblCMIDSUB")).Text.Trim(); } catch (Exception ex) { } }