private void DeleteVoucher(int VoucherMasterId) { try { VM.DeleteVoucharMaster(VoucherMasterId); MessageBox.Show("Voucher Record Delete Successfull.", "Record Deleted.", MessageBoxButtons.OK, MessageBoxIcon.Information); ClearFeilds(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error To Delete Voucher", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
//private int InsertVoucher(DateTime Date, string VoucherType, // string BranchCode, string POrderNo, string Narration, decimal TotalDebit, decimal TotalCredit, bool Hold, // bool Posted, int AddedBy, DateTime AddedOn, string AddedIpAddr) //{ // VoucherMasterId = VoucherMaster.InsertVoucharMaster(Date,VoucherType, BranchCode, POrderNo, Narration, TotalDebit, TotalCredit, Hold, Posted, AddedBy, AddedOn, AddedIpAddr); // return VoucherMasterId; //} //private void UpdateVoucher(int VoucherMasterId, DateTime Date, string VoucherType, // string BranchCode, string POrderNo, string Narration, decimal TotalDebit, decimal TotalCredit, bool Hold, // bool Posted, int UpdatedBy, DateTime UpdatedOn, string UpdatedIpAddr) //{ // VoucherMaster.UpdateVoucharMaster(VoucherMasterId, Date, VoucherType, BranchCode, POrderNo, Narration, TotalDebit, TotalCredit, Hold, Posted, UpdatedBy, UpdatedOn, UpdatedIpAddr); //} private void DeleteVoucher(int VoucherId) { try { //int VendorLedgerId = Convert.ToInt32(Vendor.GetVendorLedgerByCashPayment(txtCashPaymentCode.Text).Rows[0]["LedgerId"]); //Vendor.DeleteVendorLedger(VendorLedgerId); VM.DeleteVoucharMaster(VoucherId); MessageBox.Show("Voucher Record Delete Successfull.", "Record Deleted.", MessageBoxButtons.OK, MessageBoxIcon.Information); ClearFeilds(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error To Delete Voucher", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
//private int InsertVoucher(DateTime Date, string VoucherType, // string BranchCode, string POrderNo, string Narration, decimal TotalDebit, decimal TotalCredit, bool Hold, // bool Posted, int AddedBy, DateTime AddedOn, string AddedIpAddr) //{ // VoucherMasterId = VoucherMaster.InsertVoucharMaster(Date,VoucherType, BranchCode, POrderNo, Narration, TotalDebit, TotalCredit, Hold, Posted, AddedBy, AddedOn, AddedIpAddr); // return VoucherMasterId; //} //private void UpdateVoucher(int VoucherMasterId, DateTime Date, string VoucherType, // string BranchCode, string POrderNo, string Narration, decimal TotalDebit, decimal TotalCredit, bool Hold, // bool Posted, int UpdatedBy, DateTime UpdatedOn, string UpdatedIpAddr) //{ // VoucherMaster.UpdateVoucharMaster(VoucherMasterId, Date, VoucherType, BranchCode, POrderNo, Narration, TotalDebit, TotalCredit, Hold, Posted, UpdatedBy, UpdatedOn, UpdatedIpAddr); //} private void DeleteVoucher(int VoucherMasterId) { try { dataAcess.BeginTransaction(); manageBank.DeleteBankVoucherDetailByVoucherMasterId(VoucherMasterId, dataAcess); VM.DeleteVoucharMaster(VoucherMasterId, dataAcess); dataAcess.TransCommit(); MessageBox.Show("Voucher Record Delete Successfull.", "Record Deleted.", MessageBoxButtons.OK, MessageBoxIcon.Information); ClearFeilds(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error To Delete Voucher", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
//private int InsertVoucher(DateTime Date, string VoucherType, // string BranchCode, string POrderNo, string Narration, decimal TotalDebit, decimal TotalCredit, bool Hold, // bool Posted, int AddedBy, DateTime AddedOn, string AddedIpAddr) //{ // VoucherMasterId = VoucherMaster.InsertVoucharMaster(Date,VoucherType, BranchCode, POrderNo, Narration, TotalDebit, TotalCredit, Hold, Posted, AddedBy, AddedOn, AddedIpAddr); // return VoucherMasterId; //} //private void UpdateVoucher(int VoucherMasterId, DateTime Date, string VoucherType, // string BranchCode, string POrderNo, string Narration, decimal TotalDebit, decimal TotalCredit, bool Hold, // bool Posted, int UpdatedBy, DateTime UpdatedOn, string UpdatedIpAddr) //{ // VoucherMaster.UpdateVoucharMaster(VoucherMasterId, Date, VoucherType, BranchCode, POrderNo, Narration, TotalDebit, TotalCredit, Hold, Posted, UpdatedBy, UpdatedOn, UpdatedIpAddr); //} private void DeleteVoucher(int VoucherMasterId) { try { CustomerManager Customer = new CustomerManager(); int CustomerLedgerId = Convert.ToInt32(Customer.GetCustomerLedgerByCashRecipt(txtReceiptVoucherCode.Text).Rows[0]["LedgerId"]); Customer.DeleteCustomerLedger(CustomerLedgerId.ToString()); VM.DeleteVoucharMaster(VoucherMasterId); MessageBox.Show("Voucher Record Delete Successfull.", "Record Deleted.", MessageBoxButtons.OK, MessageBoxIcon.Information); ClearFeilds(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error To Delete Voucher", MessageBoxButtons.OK, MessageBoxIcon.Error); } }