private void toolStripAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { frmRegTrans Status = new frmRegTrans(); Status.Execute(0, 0, "", ""); PopulateGrid(); }
private void toolStripEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (TransView.RowCount > 0) { if (TransView.FocusedRowHandle >= 0) { if (TransView.GetRowCellValue(TransView.FocusedRowHandle, "Status").ToString() == "Register") { MessageBox.Show("Registration Not Edit"); return; } int lRegTransId = Convert.ToInt32(TransView.GetRowCellValue(TransView.FocusedRowHandle, "RegTransID")); int lVendorId = Convert.ToInt32(TransView.GetRowCellValue(TransView.FocusedRowHandle, "VendorId")); string sVendorName = TransView.GetRowCellValue(TransView.FocusedRowHandle, "VendorName").ToString(); string sRegNo = TransView.GetRowCellValue(TransView.FocusedRowHandle, "RegNo").ToString(); frmRegTrans sts = new frmRegTrans(); sts.Execute(lRegTransId, lVendorId, sVendorName, sRegNo); PopulateGrid(); } } }