Пример #1
0
        public JsonResult GetDailySalaryVoucher(string dailySalaryMasterId)
        {
            bool   isSuccess   = true;
            string message     = "success";
            string jsonResults = "";
            string jsonCombo   = "";
            DailySalaryVoucherMasterInfo info = new DailySalaryVoucherMasterInfo();
            bool isAutomatic = false;

            try
            {
                DailySalaryVoucherMasterSP SpMaster = new DailySalaryVoucherMasterSP();
                VoucherTypeSP spVoucherType         = new VoucherTypeSP();
                DataTable     dtbl = new DataTable();
                DailySalaryVoucherDetailsSP spDetails = new DailySalaryVoucherDetailsSP();
                int nDailySalaryMasterId = int.Parse(dailySalaryMasterId);
                info = SpMaster.DailySalaryVoucherViewFromRegister(nDailySalaryMasterId);
                info.DailySalaryVoucehrMasterId = nDailySalaryMasterId;
                isAutomatic = spVoucherType.CheckMethodOfVoucherNumbering(info.VoucherTypeId);
                bool isEditMode = nDailySalaryMasterId > 0 ? true : false;
                dtbl        = spDetails.DailySalaryVoucherDetailsGridViewAll(info.SalaryDate.ToString(), isEditMode, info.VoucherNo);
                jsonResults = 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 = isSuccess,
                message = message,
                data = new
                {
                    dailySalaryMasterId = info.DailySalaryVoucehrMasterId,
                    voucherNo = info.VoucherNo,
                    invoiceNo = info.InvoiceNo,
                    date = info.Date.ToString("yyyy-MM-dd"),
                    salaryDate = info.SalaryDate.ToString("yyyy-MM-dd"),
                    totalAmount = info.TotalAmount,
                    narration = info.Narration,
                    suffixPrefixId = info.SuffixPrefixId,
                    voucherTypeId = info.VoucherTypeId,
                    ledgerId = info.LedgerId,
                    jsonDetails = jsonResults,
                    jsonCombo = jsonCombo
                }
            }));
        }
        public List <DataTable> DailySalaryVoucherDetailsGridViewAll(string strSalaryDate, bool isEditMode, string strVoucherNumber)
        {
            DailyAttendanceDetailsSP spDailyAttendanceDetails = new DailyAttendanceDetailsSP();

            try
            {
                return(spDetails.DailySalaryVoucherDetailsGridViewAll(strSalaryDate, isEditMode, strVoucherNumber));
            }
            catch (Exception)
            {
                throw;
            }
        }
Пример #3
0
        public DataTable DailySalaryVoucherDetailsGridfill(bool @isEditmode, string voucherNo, string salaryDate)
        {
            DataTable dtbl = new DataTable();

            try
            {
                DailySalaryVoucherDetailsSP spDetails = new DailySalaryVoucherDetailsSP();
                dtbl = spDetails.DailySalaryVoucherDetailsGridViewAll(salaryDate, isEditmode, voucherNo);
            }
            catch (Exception ex)
            {
            }
            return(dtbl);
        }
        public List <DataTable> DailySalaryVoucherDetailsGridViewAll(string strSalaryDate, bool isEditMode, string strVoucherNumber)
        {
            List <DataTable> listDailySalaryVoucherDetailsGridViewAll = new List <DataTable>();

            try
            {
                listDailySalaryVoucherDetailsGridViewAll = SpDailySalaryVoucherDetails.DailySalaryVoucherDetailsGridViewAll(strSalaryDate, isEditMode, strVoucherNumber);
            }
            catch (Exception ex)
            {
                MessageBox.Show("DSV6:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(listDailySalaryVoucherDetailsGridViewAll);
        }