Update() 공개 메소드

public Update ( lkup_splmtl_diag entity ) : int
entity HealthInformationProgram.Data.Tables.lkup_splmtl_diag
리턴 int
예제 #1
0
        public int UpdateSupplementalDiagnosis(SupplementalDiagnosisModel model)
        {
            var repo = new SupplementalDiagnosisRepository();
            var dataModel = new HealthInformationProgram.Data.Tables.lkup_splmtl_diag();

            dataModel.diag_id = Convert.ToDecimal(model.DiagnosisId);
            dataModel.splmtl_diag_id = Convert.ToDecimal(model.SupplementalDiagnosisId);
            dataModel.splmtl_diag_stat = model.Status;
            dataModel.splmtl_diag_descn = model.SupplementalDiagnosisDescription;
            dataModel.user_intrfc_sort_ord = Convert.ToDecimal(model.SortOrder);
            dataModel.splmtl_diag_strt_eff_dt = Convert.ToDateTime(model.SupplementalDiagnosisEffectiveStartDate);
            dataModel.splmtl_diag_end_eff_dt = Convert.ToDateTime(model.SupplementalDiagnosisEffectiveEndDate);
            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;
            }
        }