Ejemplo n.º 1
0
        public bool Update(DiseaseHistory model)
        {
            HR_DISEASEHISTORY modelDB = _repository.FindOne(u => u.DISEASEHISTORYID == model.DISEASEHISTORYID);

            if (modelDB != null)
            {
                modelDB.DISEASENAME        = model.DISEASENAME;
                modelDB.TREATPROCESS       = model.TREATPROCESS;
                modelDB.CREATTIME          = model.CREATTIME;
                modelDB.HOSPITAL           = model.HOSPITAL;
                modelDB.STARTTIME          = model.STARTTIME;
                modelDB.RECOVERTIME        = model.RECOVERTIME;
                modelDB.CONFIRMEDTIME      = model.CONFIRMEDTIME;
                modelDB.EDITTIME           = Convert.ToDateTime(System.DateTime.Now.ToShortDateString());
                modelDB.CONFIRMEDAGE       = model.CONFIRMEDAGE;
                modelDB.CONFIRMEDADDRESS   = model.CONFIRMEDADDRESS;
                modelDB.CONFIRMEDMODE      = model.CONFIRMEDMODE;
                modelDB.CONFIRMEDRELUST    = model.CONFIRMEDRELUST;
                modelDB.SYMPTOMDESCRIPTION = model.SYMPTOMDESCRIPTION;
                modelDB.ISCANCER           = model.ISCANCER;
                modelDB.CANCERNAME         = model.CANCERNAME;
                modelDB.CANCERCODE         = model.CANCERCODE;
                modelDB.CANCERPOSITION     = model.CANCERPOSITION;
                modelDB.CELLULATYPE        = model.CELLULATYPE;
                modelDB.CLINICALSTAGES     = model.CLINICALSTAGES;
                modelDB.TUMOR      = model.TUMOR;
                modelDB.N          = model.N;
                modelDB.M          = model.M;
                modelDB.GENE       = model.GENE;
                modelDB.ISREAPPEAR = model.ISREAPPEAR;
                return(_repository.Update(modelDB));
            }
            return(false);
        }
Ejemplo n.º 2
0
 private DiseaseHistory EntityToModel(HR_DISEASEHISTORY entity)
 {
     if (entity != null)
     {
         var model = new DiseaseHistory()
         {
             DISEASEHISTORYID   = entity.DISEASEHISTORYID,
             PERSONID           = entity.PERSONID,
             DISEASENAME        = entity.DISEASENAME,
             ANNUALINCOME       = entity.ANNUALINCOME,
             TREATPROCESS       = entity.TREATPROCESS,
             CREATTIME          = entity.CREATTIME,
             HOSPITAL           = entity.HOSPITAL,
             CREATUSER          = entity.CREATUSER,
             EDITUSER           = entity.EDITUSER,
             EDITTIME           = entity.EDITTIME,
             STARTTIME          = entity.STARTTIME,
             RECOVERTIME        = entity.RECOVERTIME,
             CONFIRMEDTIME      = entity.CONFIRMEDTIME,
             CONFIRMEDAGE       = entity.CONFIRMEDAGE,
             CONFIRMEDADDRESS   = entity.CONFIRMEDADDRESS,
             CONFIRMEDMODE      = entity.CONFIRMEDMODE,
             CONFIRMEDRELUST    = entity.CONFIRMEDRELUST,
             SYMPTOMDESCRIPTION = entity.SYMPTOMDESCRIPTION,
             ISCANCER           = entity.ISCANCER,
             CANCERCODE         = entity.CANCERCODE,
             CANCERNAME         = entity.CANCERNAME,
             CANCERPOSITION     = entity.CANCERPOSITION,
             CELLULATYPE        = entity.CELLULATYPE,
             CLINICALSTAGES     = entity.CLINICALSTAGES,
             TUMOR      = entity.TUMOR,
             N          = entity.N,
             M          = entity.M,
             GENE       = entity.GENE,
             ISREAPPEAR = entity.ISREAPPEAR
         };
         return(model);
     }
     return(null);
 }
Ejemplo n.º 3
0
 private HR_DISEASEHISTORY ModelToEntity(DiseaseHistory model)
 {
     if (model != null)
     {
         var entity = new HR_DISEASEHISTORY()
         {
             DISEASEHISTORYID   = model.DISEASEHISTORYID,
             PERSONID           = model.PERSONID,
             DISEASENAME        = model.DISEASENAME,
             ANNUALINCOME       = model.ANNUALINCOME,
             TREATPROCESS       = model.TREATPROCESS,
             CREATTIME          = model.CREATTIME,
             HOSPITAL           = model.HOSPITAL,
             CREATUSER          = model.CREATUSER,
             EDITUSER           = model.EDITUSER,
             EDITTIME           = model.EDITTIME,
             STARTTIME          = model.STARTTIME,
             RECOVERTIME        = model.RECOVERTIME,
             CONFIRMEDTIME      = model.CONFIRMEDTIME,
             CONFIRMEDAGE       = model.CONFIRMEDAGE,
             CONFIRMEDADDRESS   = model.CONFIRMEDADDRESS,
             CONFIRMEDMODE      = model.CONFIRMEDMODE,
             CONFIRMEDRELUST    = model.CONFIRMEDRELUST,
             SYMPTOMDESCRIPTION = model.SYMPTOMDESCRIPTION,
             ISCANCER           = model.ISCANCER,
             CANCERCODE         = model.CANCERCODE,
             CANCERNAME         = model.CANCERNAME,
             CANCERPOSITION     = model.CANCERPOSITION,
             CELLULATYPE        = model.CELLULATYPE,
             CLINICALSTAGES     = model.CLINICALSTAGES,
             TUMOR      = model.TUMOR,
             N          = model.N,
             M          = model.M,
             GENE       = model.GENE,
             ISREAPPEAR = model.ISREAPPEAR
         };
         return(entity);
     }
     return(null);
 }