예제 #1
0
 public async Task DeleteCharacteristic(CharacteristicEntity characteristic, string userUniqueName)
 {
     try
     {
         await dapperHelper.ExecuteSP_Single <string>(SpCharacteristic.DELETE, new
         {
             @CharacteristicId = characteristic.CharacteristicId,
             @ModifiedBy       = userUniqueName
         });
     }
     catch (Exception ex)
     {
         System.Diagnostics.Debug.WriteLine(ex.StackTrace);
     }
 }
예제 #2
0
 public async Task InsertCharacteristic(CharacteristicEntity characteristic, string userUniqueName)
 {
     try
     {
         await dapperHelper.ExecuteSP_Single <string>(SpCharacteristic.INSERT, new
         {
             @CharacteristicCode        = characteristic.CharacteristicCode,
             @CharacteristicDescription = characteristic.CharacteristicDescription,
             @CreatedBy = userUniqueName
         });
     }
     catch (Exception ex)
     {
         System.Diagnostics.Debug.WriteLine(ex.StackTrace);
     }
 }
예제 #3
0
        public async Task <JsonResult> DeleteCharacteristic([FromBody] CharacteristicEntity characteristic)
        {
            try
            {
                string userUniqueName = HttpContext.User.Identity.Name;
                await characteristicServices.DeleteCharacteristic(characteristic, userUniqueName);

                var result = 0;
                return(Json(result));
            }
            catch (Exception ex)
            {
                await errorServices.ErrorNotification(ex, HttpContext.User.Identity.Name, "", "");

                return(Json(ex));
            }
        }
예제 #4
0
 public ESCharacteristic(int id)
 {
     charObject = CharacteristicEntity.GetById(id);
     common     = charObject.type == CharacteristicEntity.COMMON_CHARACTERISTIC_TYPE;
 }
예제 #5
0
 public async Task DeleteCharacteristic(CharacteristicEntity characteristic, string userUniqueName)
 {
     await characteristicRepository.DeleteCharacteristic(characteristic, userUniqueName);
 }