Example #1
0
        public bool Delete(Kest_OptionVM entity)
        {
            KEST_OPTION accType = new KEST_OPTION
            {
                option_id = entity.option_id
            };

            kestOptRepo.Delete(accType, entity.option_id);
            return(true);
        }
Example #2
0
 public Task <bool> DeleteAsync(Kest_OptionVM entity)
 {
     return(Task.Run <bool>(() =>
     {
         KEST_OPTION accType = new KEST_OPTION
         {
             option_id = entity.option_id
         };
         kestOptRepo.Delete(accType, entity.option_id);
         return true;
     }));
 }
Example #3
0
        public bool Insert(Kest_OptionVM entity)
        {
            KEST_OPTION accType = new KEST_OPTION
            {
                option_id    = entity.option_id,
                account_code = entity.account_code,
                account_id   = entity.account_id,
                account_name = entity.account_name,
                Disable      = entity.Disable,
                AddedBy      = entity.AddedBy,
                AddedOn      = entity.AddedOn,
                UpdatedOn    = entity.UpdatedOn,
                UpdatedBy    = entity.UpdatedBy
            };

            kestOptRepo.Add(accType);
            return(true);
        }
Example #4
0
 public Task <bool> UpdateAsync(Kest_OptionVM entity)
 {
     return(Task.Run <bool>(() =>
     {
         KEST_OPTION accType = new KEST_OPTION
         {
             option_id = entity.option_id,
             account_code = entity.account_code,
             account_id = entity.account_id,
             account_name = entity.account_name,
             Disable = entity.Disable,
             AddedBy = entity.AddedBy,
             AddedOn = entity.AddedOn,
             UpdatedOn = entity.UpdatedOn,
             UpdatedBy = entity.UpdatedBy
         };
         kestOptRepo.Update(accType, accType.option_id);
         return true;
     }));
 }
 public async Task<IHttpActionResult> delete([FromBody]Kest_OptionVM entity)
 {
     return Ok(await KestOptService.DeleteAsync(entity));
 }
 public async Task<IHttpActionResult> add([FromBody]Kest_OptionVM entity)
 {
     return Ok(await KestOptService.InsertAsync(entity));
 }