Esempio n. 1
0
        public async Task <JsonResult> Create(BaseDataViewModel model)
        {
            return(await ExecuteWithErrorHandling(async() =>
            {
                var cq = model.ToDataResult <NhomCoQuanResult>().Update(u => { u.CreatedBy = UserName; });

                return await ExecuteResultAsync(async() => await NhomCoQuanRepository.AddAsync(cq));
            }));
        }
Esempio n. 2
0
        public async Task <JsonResult> Create(BaseDataViewModel model)
        {
            return(await ExecuteWithErrorHandling(async() =>
            {
                var result = model.ToDataResult <LinhVucCongViecResult>().Update(u => { u.CreatedBy = UserName; });

                return await ExecuteResultAsync(async() => await CongViecRepository.AddAsync(result));
            }));
        }
        public async Task <JsonResult> Create(BaseDataViewModel model)
        {
            return(await ExecuteWithErrorHandling(async() =>
            {
                var ht = model.ToDataResult <MucDoHoanThanhResult>().Update(u => { u.CreatedBy = UserName; });

                return await ExecuteResultAsync(async() => await MucDoRepository.AddAsync(ht));
            }));
        }
Esempio n. 4
0
        public async Task <JsonResult> Edit(int id, BaseDataViewModel model)
        {
            return(await ExecuteWithErrorHandling(async() =>
            {
                var vq = model.ToDataResult <NhomCoQuanResult>().Update(u =>
                {
                    u.Id = id;
                    u.LastUpdatedBy = UserName;
                });

                return await ExecuteResultAsync(async() => await NhomCoQuanRepository.UpdateAsync(vq));
            }));
        }
Esempio n. 5
0
        public async Task <JsonResult> Edit(int id, BaseDataViewModel model)
        {
            return(await ExecuteWithErrorHandling(async() =>
            {
                var cv = model.ToDataResult <LinhVucCongViecResult>().Update(u =>
                {
                    u.Id = id;
                    u.LastUpdatedBy = UserName;
                });

                return await ExecuteResultAsync(async() => await CongViecRepository.UpdateAsync(cv));
            }));
        }