public bool Delete(Income_Account_TypesVM entity)
        {
            Income_Account_Types accType = new Income_Account_Types
            {
                ID = entity.ID
            };

            incomeAccTypRepo.Delete(accType, entity.ID);
            return(true);
        }
 public Task <bool> DeleteAsync(Income_Account_TypesVM entity)
 {
     return(Task.Run <bool>(() =>
     {
         Income_Account_Types accType = new Income_Account_Types
         {
             ID = entity.ID
         };
         incomeAccTypRepo.Delete(accType, entity.ID);
         return true;
     }));
 }
        public bool Insert(Income_Account_TypesVM entity)
        {
            Income_Account_Types accType = new Income_Account_Types
            {
                ID        = entity.ID,
                NameAr    = entity.NameAr,
                NameEn    = entity.NameEn,
                AddedBy   = entity.AddedBy,
                AddedOn   = entity.AddedOn,
                disable   = entity.disable,
                UpdatedOn = entity.UpdatedOn,
                UpdatedBy = entity.UpdatedBy
            };

            incomeAccTypRepo.Add(accType);
            return(true);
        }
 public Task <bool> UpdateAsync(Income_Account_TypesVM entity)
 {
     return(Task.Run <bool>(() =>
     {
         Income_Account_Types accType = new Income_Account_Types
         {
             ID = entity.ID,
             NameAr = entity.NameAr,
             NameEn = entity.NameEn,
             AddedBy = entity.AddedBy,
             AddedOn = entity.AddedOn,
             disable = entity.disable,
             UpdatedOn = entity.UpdatedOn,
             UpdatedBy = entity.UpdatedBy
         };
         incomeAccTypRepo.Update(accType, accType.ID);
         return true;
     }));
 }
Exemple #5
0
 public async Task <IHttpActionResult> delete([FromBody] Income_Account_TypesVM entity)
 {
     return(Ok(await incomeAccTypService.DeleteAsync(entity)));
 }