Esempio n. 1
0
        public override int GetHashCode()
        {
            var hash = 17;

            hash = hash * 23 + TaxPercent.GetHashCode();
            // TODO: Add items
            return(hash);
        }
Esempio n. 2
0
        public async Task <bool> Modify(TaxPercent _model)
        {
            _model.UpdatedUser = scopeContext.UserCode;
            _model.UpdatedDate = DateTime.Now;
            context.Update(_model);
            await context.SaveChangesAsync();

            return(true);
        }
Esempio n. 3
0
        public async Task <int> Add(TaxPercent _model)
        {
            _model.CreatedUser = scopeContext.UserCode;
            _model.CreatedDate = DateTime.Now;
            context.Add(_model);
            await context.SaveChangesAsync();

            return(_model.Id);
        }
Esempio n. 4
0
        public async Task <bool> Modify(int _id, TaxPercentModel _model)
        {
            TaxPercent entity = await svcTaxPercent.GetDetail(_id);

            if (entity == null)
            {
                return(false);
            }
            entity = iMapper.Map(_model, entity);
            return(await svcTaxPercent.Modify(entity));
        }
Esempio n. 5
0
        public async Task <bool> Remove(int _id)
        {
            TaxPercent item = await context.TaxPercent.Where(i => i.Id == _id).FirstOrDefaultAsync();

            if (item == default(TaxPercent))
            {
                return(false);
            }
            item.IsDeleted = true;
            context.Entry(item).Property(x => x.IsDeleted).IsModified = true;
            await context.SaveChangesAsync();

            return(true);
        }
Esempio n. 6
0
        public override string ToString()
        {
            var content = "Id =" + Id + Environment.NewLine +
                          "Parent Id =" + ParentId + Environment.NewLine +
                          "Check Balance Required =" + CheckBalanceRequired + Environment.NewLine +
                          "To Role Id =" + ToRole.Id + Environment.NewLine +
                          "To Role Name =" + ToRole.Name + Environment.NewLine +
                          "Min Value=" + MinValue.ToString("N0") + Environment.NewLine +
                          "Max Value =" + MaxValue.ToString("N0") + Environment.NewLine +
                          "Tax Per =" + TaxPercent.ToString("N2") + Environment.NewLine +
                          "Bonus Per =" + BonusPercent.ToString("N2") + Environment.NewLine +
                          "Bonus Tax Per =" + BonusTaxPercent.ToString("N2") + Environment.NewLine +
                          "Fixed Factor =" + FixedFactor.ToString("N6") + Environment.NewLine +
                          "Created On=" + CreatedOn.ToString("yyyy/MM/dd H:mm:ss") + Environment.NewLine +
                          "Created By=" + CreatedBy.Id + Environment.NewLine +
                          "Created By Account=" + CreatedBy.Account + Environment.NewLine +
                          "Last Edit On=" + LastEditOn.ToString("yyyy/MM/dd H:mm:ss");

            return(content);
        }
Esempio n. 7
0
        public async Task <int> Add(TaxPercentModel _model)
        {
            TaxPercent entity = iMapper.Map <TaxPercent>(_model);

            return(await svcTaxPercent.Add(entity));
        }