예제 #1
0
        public async Task <dynamic> Execute(ContextDto context)
        {
            try
            {
                dynamic result = new System.Dynamic.ExpandoObject();
                var     repo   = new KhoKhachHangRepository(context);
                await repo.UpdatePartial(this,
                                         nameof(Ma),
                                         nameof(Ten),
                                         nameof(Loai),
                                         nameof(DienThoai),
                                         nameof(DiDong),
                                         nameof(Email),
                                         nameof(DiaChi),
                                         nameof(TinhThanhPhoId),
                                         nameof(QuanHuyenId),
                                         nameof(PhuongXaId),
                                         nameof(AnyDesk),
                                         nameof(GhiChu),
                                         nameof(MaSoThue)
                                         );

                result.data = this;
                InsertLuocSuAction ls = new InsertLuocSuAction();
                ls.InsertLuocSu(context, "KhoKhachHang", KhachHangId, "Update", 0);
                return(returnActionResult(this, null));
            }
            catch (FormatException ex)
            {
                return(returnActionError(HttpStatusCode.BadRequest, ex.Message));
            }
            catch (Exception ex)
            {
                return(returnActionError(HttpStatusCode.InternalServerError, ex.Message));
            }
        }