public decimal SalaryVoucherMasterGetMaxPlusOne(decimal decVoucherTypeId) { decimal max = 0; try { max = SpMaster.SalaryVoucherMasterGetMaxPlusOne(decVoucherTypeId); } catch (Exception) { throw; } return(max); }
public decimal SalaryVoucherMasterGetMaxPlusOne(decimal decVoucherTypeId) { decimal max = 0; try { max = SpDailySalaryVoucherMaster.SalaryVoucherMasterGetMaxPlusOne(decVoucherTypeId); } catch (Exception ex) { MessageBox.Show("DSV15:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(max); }
public ActionResult GetDailySalaryVoucherForModal(string salaryDate) { bool isSuccess = true; string message = string.Empty; string jsonResult = string.Empty; string jsonCombo = string.Empty; string strVoucherNo = string.Empty; string strTableName = "DailySalaryVoucherMaster"; try { VoucherTypeSP spVoucherType = new VoucherTypeSP(); DataTable dtblVouchetType = new DataTable(); dtblVouchetType = spVoucherType.VoucherTypeSelectionComboFill("Daily Salary Voucher"); int inCount = dtblVouchetType.Rows.Count; string voucherType = string.Empty; if (inCount == 1) { voucherType = dtblVouchetType.Rows[0].ItemArray[0].ToString(); decimal decDailyVoucherTypeId = decimal.Parse(voucherType); TransactionsGeneralFill TransactionsGeneralFillobj = new TransactionsGeneralFill(); DailySalaryVoucherMasterSP spmaster = new DailySalaryVoucherMasterSP(); strVoucherNo = spmaster.SalaryVoucherMasterGetMaxPlusOne(decDailyVoucherTypeId).ToString(); strVoucherNo = TransactionsGeneralFillobj.VoucherNumberAutomaicGeneration(decDailyVoucherTypeId, Convert.ToDecimal(strVoucherNo), Convert.ToDateTime(salaryDate), strTableName); } DataTable dtbl = DailySalaryVoucherDetailsGridfill(false, "0", salaryDate); jsonResult = Utils.ConvertDataTabletoString(dtbl); DailySalaryVoucherMasterSP spMaster = new DailySalaryVoucherMasterSP(); DataTable newDtbl = new DataTable(); newDtbl = spMaster.DailySalaryVoucherCashOrBankLedgersComboFill(); jsonCombo = Utils.ConvertDataTabletoString(newDtbl); } catch (Exception ex) { isSuccess = false; message = ex.Message; } return(Json(new { isSuccess, message, voucherNo = strVoucherNo, data = jsonResult, jsonCombo })); }