protected void txtcustomer_TextChanged(object sender, EventArgs e) { CustCode = txtcustomer.Text.ToString().Split(':')[0].Trim(); DataTable dt = new DataTable(); dt = DCMaster.Get_Name(CustCode, "Customer").Tables[0]; if (dt.Rows.Count != 0) { txtcustomer.Text = CustCode; lblCustName.Text = Convert.ToString(dt.Rows[0]["CustName"]); DataSet ds = booktype_Custmer_discount_Mapping.Get_AddDiscount_On_Cusomer(CustCode); if (ds.Tables[0].Rows.Count > 0) { txtAdiscount.Text = Convert.ToString(ds.Tables[0].Rows[0][0].ToString()); } // pnlDisountDetails.Visible = true; GrdViewCustDisDetails.DataSource = booktype_Custmer_discount_Mapping.Get_CustomerDiscountBy_BookType(txtcustomer.Text.ToString()); GrdViewCustDisDetails.DataBind(); // ds.Tables[0].Rows[0][0] btn_Save.Visible = true; UpanelGrd.Update(); upSAve.Update(); } else { lblCustName.Text = "No such Customer code"; txtcustomer.Focus(); txtcustomer.Text = ""; } }
protected void txtcustomer_TextChanged(object sender, EventArgs e) { CustCode = txtcustomer.Text.ToString().Split(':')[0].Trim(); DataTable dt = new DataTable(); dt = DCMaster.Get_Name(CustCode, "Customer").Tables[0]; if (dt.Rows.Count != 0) { txtcustomer.Text = CustCode; lblCustName.Text = Convert.ToString(dt.Rows[0]["CustName"]); DataSet ds = booktype_Custmer_discount_Mapping.Get_AddDiscount_On_Cusomer(CustCode); if (ds.Tables[0].Rows.Count > 0) { txtAdiscount.Text = Convert.ToString(ds.Tables[0].Rows[0][0].ToString()); } // pnlDisountDetails.Visible = true; GrdViewCustDisDetails.DataSource = booktype_Custmer_discount_Mapping.Get_CustomerDiscountBy_BookType(txtcustomer.Text.ToString() + "!" + Session["FY"].ToString()); GrdViewCustDisDetails.DataBind(); BindgrdTransportDetails(); // ds.Tables[0].Rows[0][0] btn_Save.Visible = true; DataSet dsTransport = new DataSet(); dsTransport = Idv.Chetana.BAL.CustomerToTransport.Get_CustomerandTransporterValueAD(CustCode); if (dsTransport.Tables[0].Rows.Count != 0) { pnlGet_TransDetails.Visible = true; grdget.DataSource = dsTransport.Tables[0]; grdget.DataBind(); grdget.Visible = true; } else { grdget.Visible = false; // MessageBox("No Such Record Found"); } UpanelGrd.Update(); upSAve.Update(); } else { lblCustName.Text = "No such Customer code"; txtcustomer.Focus(); txtcustomer.Text = ""; } }