コード例 #1
0
 public ReturnValue AddUpdate(InternalMedicine model)
 {
     ReturnValue resoult = dalInternalMedicine.Search(model.EmployeeID,model.YearMonth);
     if (!resoult.ErrorFlag)
     {
         return resoult;
     }
     if (resoult.Count > 0)
     {
         resoult = dalInternalMedicine.Update(model);
         if (resoult.ErrorFlag)
         {
             BLL_Log.AddLog(model.UPDATER_ID + " 修改了用户 " + model.EmployeeID + " 的内科信息", "1", model.TERMINAL_CD);
         }
     }
     else
     {
         resoult = dalInternalMedicine.Add(model);
         if (resoult.ErrorFlag)
         {
             BLL_Log.AddLog(model.UPDATER_ID + " 修改了用户 " + model.EmployeeID + " 的内科信息", "1", model.TERMINAL_CD);
         }
     }
     return resoult;
 }
コード例 #2
0
 public ReturnValue Add(InternalMedicine model)
 {
     SqlParameter[] parameters = {
             new SqlParameter("@UPDATER_ID", SqlDbType.NVarChar,12),
             new SqlParameter("@TERMINAL_CD", SqlDbType.NVarChar,256),
             new SqlParameter("@EmployeeID", SqlDbType.NVarChar,18),
             new SqlParameter("@YearMonth", SqlDbType.NVarChar,6),
             new SqlParameter("@BloodPressure", SqlDbType.NVarChar,12),
             new SqlParameter("@DevelopmentStatus", SqlDbType.NVarChar,256),
             new SqlParameter("@Neurological", SqlDbType.NVarChar,256),
             new SqlParameter("@Lung", SqlDbType.NVarChar,256),
             new SqlParameter("@HeartBlood", SqlDbType.NVarChar,256),
             new SqlParameter("@AbdominalOrgans", SqlDbType.NVarChar,256),
             new SqlParameter("@Liver", SqlDbType.NVarChar,256),
             new SqlParameter("@Spleen", SqlDbType.NVarChar,256),
             new SqlParameter("@Other", SqlDbType.NVarChar,256),
             new SqlParameter("@MedicalAdvice", SqlDbType.NVarChar,1024),
             new SqlParameter("@Physicians", SqlDbType.NVarChar,50)};
     parameters[0].Value = model.UPDATER_ID;
     parameters[1].Value = model.TERMINAL_CD;
     parameters[2].Value = model.EmployeeID;
     parameters[3].Value = model.YearMonth;
     parameters[4].Value = model.BloodPressure;
     parameters[5].Value = model.DevelopmentStatus;
     parameters[6].Value = model.Neurological;
     parameters[7].Value = model.Lung;
     parameters[8].Value = model.HeartBlood;
     parameters[9].Value = model.AbdominalOrgans;
     parameters[10].Value = model.Liver;
     parameters[11].Value = model.Spleen;
     parameters[12].Value = model.Other;
     parameters[13].Value = model.MedicalAdvice;
     parameters[14].Value = model.Physicians;
     return SqlHelper.ExecuteSql(Add_SQL, parameters);
 }
コード例 #3
0
ファイル: Service.cs プロジェクト: wgang10/XTHospatal
 public ReturnValue AddUpdateInternalMeicine(InternalMedicine model)
 {
     BLL_InternalMedicine bll = new BLL_InternalMedicine();
     return bll.AddUpdate(model);
 }
コード例 #4
0
 public ReturnValue Update(InternalMedicine model)
 {
     OleDbParameter[] parametersUpdate = {
             new OleDbParameter("@UPDATER_ID", OleDbType.VarWChar,12),
             new OleDbParameter("@TERMINAL_CD", OleDbType.LongVarWChar),
             new OleDbParameter("@BloodPressure", OleDbType.VarWChar,12),
             new OleDbParameter("@BloodPressure1", OleDbType.VarWChar,12),
             new OleDbParameter("@DevelopmentStatus", OleDbType.LongVarWChar),
             new OleDbParameter("@Neurological", OleDbType.LongVarWChar),
             new OleDbParameter("@Lung", OleDbType.LongVarWChar),
             new OleDbParameter("@HeartBlood", OleDbType.LongVarWChar),
             new OleDbParameter("@AbdominalOrgans", OleDbType.LongVarWChar),
             new OleDbParameter("@Liver", OleDbType.LongVarWChar),
             new OleDbParameter("@Spleen", OleDbType.LongVarWChar),
             new OleDbParameter("@Other", OleDbType.LongVarWChar),
             new OleDbParameter("@MedicalAdvice", OleDbType.LongVarWChar),
             new OleDbParameter("@Physicians", OleDbType.VarWChar,50),
             new OleDbParameter("@EmployeeID", OleDbType.VarWChar,18),
             new OleDbParameter("@YearMonth", OleDbType.VarWChar,6)};
     parametersUpdate[0].Value = model.UPDATER_ID;
     parametersUpdate[1].Value = model.TERMINAL_CD;
     parametersUpdate[2].Value = model.BloodPressure;
     parametersUpdate[3].Value = model.BloodPressure1;
     parametersUpdate[4].Value = model.DevelopmentStatus;
     parametersUpdate[5].Value = model.Neurological;
     parametersUpdate[6].Value = model.Lung;
     parametersUpdate[7].Value = model.HeartBlood;
     parametersUpdate[8].Value = model.AbdominalOrgans;
     parametersUpdate[9].Value = model.Liver;
     parametersUpdate[10].Value = model.Spleen;
     parametersUpdate[11].Value = model.Other;
     parametersUpdate[12].Value = model.MedicalAdvice;
     parametersUpdate[13].Value = model.Physicians;
     parametersUpdate[14].Value = model.EmployeeID;
     parametersUpdate[15].Value = model.YearMonth;
     return OleDbHelper.ExecuteSql(Update_SQL, parametersUpdate);
 }