protected void btnDelete_Click(object sender, EventArgs e) { Other_G obj = new Other_G(); obj.DeleteModule(lblDocNo.Text.Trim(), "getPass", ""); MessageBox("Info ! \\r\\n Record Deleted!!!"); Clear(); CallButonVisible("new"); }
protected void grdVehicle_RowDeleting(object sender, GridViewDeleteEventArgs e) { Label lblVehsID = (Label)grdVehicle.Rows[e.RowIndex].FindControl("lblVehID"); Other_G obj = new Other_G(); obj.DeleteModule(lblVehsID.Text.Trim(), "vehicle", ""); MessageBox("Info ! \\r\\n Record Deleted!!!"); grdVehicle.Rows[e.RowIndex].Visible = false; }
protected void txtDcNo_TextChanged(object sender, EventArgs e) { DataSet ds = Other_G.getInfoNoForGodown(Convert.ToInt32(strFY), Convert.ToInt32(txtDcNo.Text), "dcno"); if (ds.Tables[0].Rows.Count > 0) { try { txtcustomer.Text = ""; txtcustomer.Text = ds.Tables[0].Rows[0]["Name"].ToString(); lbltransporter.Visible = true; lbltransporter.Text = ds.Tables[0].Rows[0]["Transporter"].ToString(); lblTransID.Text = ds.Tables[0].Rows[0]["AutoID"].ToString(); txttransporter.Text = ds.Tables[0].Rows[0]["trans"].ToString(); upCustomerName.Update(); callTextChange(); if (ds.Tables[1].Rows.Count > 0) { txtBillNo.Text = string.Format("{0:0.00}", Convert.ToDouble(ds.Tables[1].Rows[0][0].ToString())); UpdatePanel2.Update(); } else { if (txtDcNo.Text != "") { txtBillNo.Text = string.Format("{0:0.00}", (Convert.ToDouble(txtDcNo.Text.Trim()) + 0.01)); UpdatePanel2.Update(); } } } catch (Exception EX) { MessageBox("Error: Record not found"); } } else { txtBillNo.Text = ""; UpdatePanel2.Update(); txtcustomer.Text = ""; lblCustomer.Text = "No such Customer code"; upCustomerName.Update(); } txtBillNo.Focus(); }
protected void txtDcNo_TextChanged(object sender, EventArgs e) { DataSet ds = Other_G.getInfoNoForGodown(Convert.ToInt32(strFY), Convert.ToInt32(txtDcNo.Text), "dcno"); if (ds.Tables[0].Rows.Count > 0) { txtCust.Text = ""; txtCust.Text = ds.Tables[0].Rows[0]["Name"].ToString(); txtArea.Text = txtCust.Text.Trim().Split(':')[4].ToString(); callTextChange(); txtBillNo.Focus(); } else { txtCust.Text = ""; lblCustomer.Text = "No such Customer code"; } txtBillNo.Focus(); }
protected void txtDcNo_TextChanged(object sender, EventArgs e) { DataSet ds = Other_G.getInfoNoForGodown(Convert.ToInt32(strFY), Convert.ToInt32(txtDcNo.Text), "speciman"); if (ds.Tables[0].Rows.Count > 0) { txtCust.Text = ""; txtCust.Text = ds.Tables[0].Rows[0]["EmpCode"].ToString(); txtArea.Text = ds.Tables[0].Rows[0]["City"].ToString(); lblCustomer.Text = ds.Tables[0].Rows[0]["Name"].ToString(); lblCustID.Text = ds.Tables[0].Rows[0]["EmpID"].ToString(); txtBillNo.Focus(); } else { txtCust.Text = ""; lblCustomer.Text = "No such Sales Man code"; } txtBillNo.Focus(); }
public string[] GetGodownCodes(string prefixText, int count, string contextKey) { DataSet ds = new DataSet(); string[] items = null; Other_G obj = new Other_G(); ds = obj.GetNameByCode(prefixText, contextKey); int size = ds.Tables[0].Rows.Count; items = new string[size]; int i = 0; if (ds.Tables[0].Rows.Count > 0) { foreach (DataRow dr in ds.Tables[0].Rows) { items.SetValue(dr["Name"].ToString(), i); i++; } } return(items); }