Ejemplo n.º 1
0
        public IHttpActionResult UpdatePost(StaffViewModel model)
        {
            var response = new SimpleResponse();

            response = iStaffBusiness.Update(model);
            return(Json(response));
        }
Ejemplo n.º 2
0
        public ActionResult UpdatePost(StaffViewModel model)
        {
            var response = iStaffBusiness.Update(model);

            if (response.ResponseCode > 0)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                ModelState.AddModelError(string.Empty, response.ResponseMessage);
                return(View("Edit", model));
            }
        }
Ejemplo n.º 3
0
 private void Update_Click(object sender, RoutedEventArgs e)
 {
     if (staffViewModel.IsValidModel())
     {
         var isUpdate = _staffBusiness.Update(staffViewModel);
         if (isUpdate)
         {
             MessageBox.Show("Đã cập nhật thành công!", "Update", MessageBoxButton.OK, MessageBoxImage.Information);
         }
         else
         {
             MessageBox.Show("Cập nhật không thành công!", "Update", MessageBoxButton.OK, MessageBoxImage.Error);
         }
     }
 }
Ejemplo n.º 4
0
        public SimpleResponse Update(StaffDto dto)
        {
            var response = new SimpleResponse();

            try
            {
                var model = SimpleMapper.Map <StaffDto, StaffViewModel>(dto);
                response = iStaffBusiness.Update(model);
            }
            catch (Exception ex)
            {
                response.ResponseCode    = BusinessResponseValues.InternalError;
                response.ResponseMessage = "Güncelleme iþleminde hata oluþtu.";
                SimpleFileLogger.Instance.Error(ex);
            }

            return(response);
        }
Ejemplo n.º 5
0
 public StaffModel UpdateStaff([FromBody] StaffModel model)
 {
     _itemBusiness.Update(model);
     return(model);
 }
Ejemplo n.º 6
0
        public SimpleResponse Update(StaffViewModel model)
        {
            var response = iStaffBusiness.Update(model);

            return(response);
        }