private void lstExpression_DoubleClick(object sender, EventArgs e) { uctxtExpression.Text = lstExpression.Text; PanelSearch.Visible = false; mfgVoucherList(0); DGMFGVoucherList.Focus(); }
private void uctxtExpression_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)Keys.Return) { if (lstExpression.Visible) { if (lstExpression.Items.Count > 0) { uctxtExpression.Text = lstExpression.Text; } } //mFetchRecord(uctxtFindWhat.Text, uctxtExpression.Text, uctxtFromDate.Text, uctxtToDate.Text); mfgVoucherList(); PanelSearch.Visible = false; DGMFGVoucherList.Focus(); } }
private void btnApproved_Click(object sender, EventArgs e) { int intcount = 0; string strmsg = "", strTLocation = ""; try { for (int i = 0; i < DGMFGVoucherList.Rows.Count; i++) { if (DGMFGVoucherList.Rows[i].Cells[14].Value.ToString() == "Yes") { MessageBox.Show("Sorry!Already Approved"); DGMFGVoucherList.Focus(); return; } if (Convert.ToBoolean(DGMFGVoucherList.Rows[i].Cells[13].Value) == true) { strmsg = objWIS.gUpdateProductionOrder(strComID, DGMFGVoucherList[11, i].Value.ToString(), 1, strTLocation, "", Convert.ToInt32(Utility.Val(DGMFGVoucherList.Rows[i].Cells[15].Value.ToString()))); intcount += 1; //if (strmsg == "1") //{ // DGMFGVoucherList.Rows.RemoveAt(i); //} } strTLocation = ""; } if (strmsg == "1") { mfgVoucherList(0); MessageBox.Show(intcount + " Records Approved Successfully..."); } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }