public int UpdateAccountLedger(PharmaBusinessObjects.Master.AccountLedgerMaster p) { try { return(new AccountLedgerMasterBiz(this.LoggedInUser).UpdateAccountLedger(p)); } catch (Exception) { throw; } }
private void EditLedger() { if (dgvAccountLedger.SelectedRows.Count == 0) { MessageBox.Show("Please select atleast one row to edit"); } PharmaBusinessObjects.Master.AccountLedgerMaster model = (PharmaBusinessObjects.Master.AccountLedgerMaster)dgvAccountLedger.SelectedRows[0].DataBoundItem; selectedRowIndex = model.AccountLedgerID; OpenAddEdit(model.AccountLedgerID); }
private void DgvAccountLedger_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { if (e.RowIndex != -1) { PharmaBusinessObjects.Master.AccountLedgerMaster model = (PharmaBusinessObjects.Master.AccountLedgerMaster)dgvAccountLedger.Rows[e.RowIndex].DataBoundItem; OpenAddEdit(model.AccountLedgerID); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }