Update() public méthode

public Update ( lkup_splmtl_diag_cat entity ) : int
entity HealthInformationProgram.Data.Tables.lkup_splmtl_diag_cat
Résultat int
        public int UpdateSupplementalDiagnosisCategory(SupplementalDiagnosisCategoryModel model)
        {
            var repo = new SupplementalDiagnosisCategoryRepository();
            var dataModel = new HealthInformationProgram.Data.Tables.lkup_splmtl_diag_cat();

            dataModel.splmtl_diag_cat_id = Convert.ToDecimal(model.SupplementalDiagnosisCategoryId);
            dataModel.splmtl_diag_cat_stat = model.Status;
            dataModel.splmtl_diag_cat = model.SupplementalDiagnosisCategoryType;
            dataModel.user_intrfc_sort_ord = Convert.ToDecimal(model.SortOrder);
            dataModel.splmtl_diag_cat_strt_eff_dt = Convert.ToDateTime(model.SupplementalDiagnosisCategoryEffectiveStartDate);
            dataModel.splmtl_diag_cat_end_eff_dt = Convert.ToDateTime(model.SupplementalDiagnosisCategoryEffectiveEndDate);

            dataModel.rec_updt_dt = DateTime.Now;
            dataModel.rec_updt_user_id_cd = model.UpdatedBy;

            try
            {

                var returnCode = repo.Update(dataModel);
                return returnCode;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }