コード例 #1
0
        public async Task <IHttpActionResult> delete([FromBody] Entry_DetailsVM entity)
        {
            var result = await entryDetailsService.DeleteAsync(entity);

            //await LogData(entity.ACC_CODE, entity.ENTRY_ID.ToString());
            return(Ok(result));
        }
コード例 #2
0
        public async Task <IHttpActionResult> add([FromBody] Entry_DetailsVM entity)
        {
            var result = await entryDetailsService.InsertAsync(entity);

            // await LogData(null, result.ToString());
            if (result != 0)
            {
                return(Ok(true));
            }
            return(Ok(false));
        }
コード例 #3
0
        public Task <bool> DeleteAsync(Entry_DetailsVM entity)
        {
            return(Task.Run <bool>(() =>
            {
                ENTRY_DETAILS et = new ENTRY_DETAILS
                {
                    ENTRY_ROW_NUMBER = entity.ENTRY_ROW_NUMBER,
                    ENTRY_ID = entity.ENTRY_ID,
                    ACC_ID = entity.ACC_ID,
                    COST_CENTER_ID = entity.COST_CENTER_ID,
                    ENTRY_CREDIT = entity.ENTRY_CREDIT,
                    ENTRY_DEBIT = entity.ENTRY_DEBIT,
                    ENTRY_GOLD24_CREDIT = entity.ENTRY_GOLD24_CREDIT,
                    ENTRY_GOLD24_DEBIT = entity.ENTRY_GOLD24_DEBIT,

                    ENTRY_GOLD22_CREDIT = entity.ENTRY_GOLD22_CREDIT,
                    ENTRY_GOLD22_DEBIT = entity.ENTRY_GOLD22_DEBIT,

                    ENTRY_GOLD21_CREDIT = entity.ENTRY_GOLD21_CREDIT,
                    ENTRY_GOLD21_DEBIT = entity.ENTRY_GOLD21_DEBIT,

                    ENTRY_GOLD18_CREDIT = entity.ENTRY_GOLD18_CREDIT,
                    ENTRY_GOLD18_DEBIT = entity.ENTRY_GOLD18_DEBIT,
                    ENTRY_DETAILS_REMARKS = entity.ENTRY_DETAILS_REMARKS,
                    AddedBy = entity.AddedBy,
                    AddedOn = entity.AddedOn,
                    UpdatedBy = entity.UpdatedBy,
                    UpdatedOn = entity.UpdatedOn,
                    Disable = entity.Disable,
                    Taxable = entity.Taxable,
                    TaxValue = entity.TaxValue,
                    TaxRate = entity.TaxRate,

                    CheckNumber = entity.CheckNumber,
                    CheckDate = entity.CheckDate,
                    CheckIssueDate = entity.CheckIssueDate,
                    IsExemptOfTax = entity.IsExemptOfTax,


                    ExemptOfTaxValue = entity.ExemptOfTaxValue,
                    IsMainVatValue = entity.IsMainVatValue,
                    MainVatValue = entity.MainVatValue,
                    IsZeroVatValue = entity.IsZeroVatValue,
                    ZeroVatValue = entity.ZeroVatValue,
                    MainVat = entity.MainVat
                };
                object[] keys = new object[2] {
                    entity.ENTRY_ID, entity.ENTRY_ROW_NUMBER
                };
                entrydetailsRepo.DeleteComposite(et, keys);
                return true;
            }));
        }
コード例 #4
0
        public Task <long> InsertAsync(Entry_DetailsVM entity)
        {
            return(Task.Run <long>(() =>
            {
                ENTRY_DETAILS et = new ENTRY_DETAILS
                {
                    ENTRY_ROW_NUMBER = entity.ENTRY_ROW_NUMBER,
                    ENTRY_ID = entity.ENTRY_ID,
                    ACC_ID = entity.ACC_ID,
                    COST_CENTER_ID = entity.COST_CENTER_ID,
                    ENTRY_CREDIT = entity.ENTRY_CREDIT,
                    ENTRY_DEBIT = entity.ENTRY_DEBIT,
                    ENTRY_GOLD24_CREDIT = entity.ENTRY_GOLD24_CREDIT,
                    ENTRY_GOLD24_DEBIT = entity.ENTRY_GOLD24_DEBIT,

                    ENTRY_GOLD22_CREDIT = entity.ENTRY_GOLD22_CREDIT,
                    ENTRY_GOLD22_DEBIT = entity.ENTRY_GOLD22_DEBIT,

                    ENTRY_GOLD21_CREDIT = entity.ENTRY_GOLD21_CREDIT,
                    ENTRY_GOLD21_DEBIT = entity.ENTRY_GOLD21_DEBIT,

                    ENTRY_GOLD18_CREDIT = entity.ENTRY_GOLD18_CREDIT,
                    ENTRY_GOLD18_DEBIT = entity.ENTRY_GOLD18_DEBIT,
                    ENTRY_DETAILS_REMARKS = entity.ENTRY_DETAILS_REMARKS,
                    AddedBy = entity.AddedBy,
                    AddedOn = entity.AddedOn,
                    UpdatedBy = entity.UpdatedBy,
                    UpdatedOn = entity.UpdatedOn,
                    Disable = entity.Disable,
                    Taxable = entity.Taxable,
                    TaxValue = entity.TaxValue,
                    TaxRate = entity.TaxRate,

                    CheckNumber = entity.CheckNumber,
                    CheckDate = entity.CheckDate,
                    CheckIssueDate = entity.CheckIssueDate,
                    IsExemptOfTax = entity.IsExemptOfTax,


                    ExemptOfTaxValue = entity.ExemptOfTaxValue,
                    IsMainVatValue = entity.IsMainVatValue,
                    MainVatValue = entity.MainVatValue,
                    IsZeroVatValue = entity.IsZeroVatValue,
                    ZeroVatValue = entity.ZeroVatValue,
                    MainVat = entity.MainVat
                };
                entrydetailsRepo.Add(et);
                return et.ENTRY_ID;
            }));
        }