コード例 #1
0
        public async Task <VmGenericServiceResult> Update(VmIndustryItem vmtem)
        {
            VmGenericServiceResult result = new VmGenericServiceResult();

            try
            {
                Industry r = await repo.Get(vmtem.Id);

                Copy <VmIndustryItem, Industry>(vmtem, r);

                if (r.UpdatedBy.IsNullOrEmpty())
                {
                    r.UpdatedBy = "System";
                }

                repo.Update(r);

                repo.Commit();

                result.IsSuccess = true;
            }
            catch (Exception e)
            {
                result.IsSuccess = false;
                result.Error     = e;
            }

            return(result);
        }