Esempio n. 1
0
 public ReturnValue AddUpdate(Bexamination model)
 {
     ReturnValue resoult = dalBexamination.Search(model.EmployeeID,model.YearMonth);
     if (!resoult.ErrorFlag)
     {
         return resoult;
     }
     if (resoult.Count > 0)
     {
         resoult = dalBexamination.Update(model);
         if (resoult.ErrorFlag)
         {
             BLL_Log.AddLog(model.UPDATER_ID + " 修改了用户 " + model.EmployeeID + " 的B超信息", "1", model.TERMINAL_CD);
         }
     }
     else
     {
         resoult = dalBexamination.Add(model);
         if (resoult.ErrorFlag)
         {
             BLL_Log.AddLog(model.UPDATER_ID + " 修改了用户 " + model.EmployeeID + " 的B超信息", "1", model.TERMINAL_CD);
         }
     }
     return resoult;
 }
Esempio n. 2
0
 public ReturnValue Add(Bexamination model)
 {
     OleDbParameter[] parameters = {
             new OleDbParameter("@UPDATER_ID", OleDbType.VarWChar,12),
             new OleDbParameter("@TERMINAL_CD", OleDbType.LongVarWChar),
             new OleDbParameter("@EmployeeID", OleDbType.VarWChar,18),
             new OleDbParameter("@YearMonth", OleDbType.VarWChar,6),
             new OleDbParameter("@BID", OleDbType.VarWChar,10),
             new OleDbParameter("@HistorySigns", OleDbType.LongVarWChar),
             new OleDbParameter("@LaboratoryExamination", OleDbType.LongVarWChar),
             new OleDbParameter("@Diagnosis", OleDbType.LongVarWChar),
             new OleDbParameter("@Purpose", OleDbType.LongVarWChar),
             new OleDbParameter("@Results", OleDbType.LongVarWChar),
             new OleDbParameter("@BImage", OleDbType.LongVarBinary),
             new OleDbParameter("@Physicians", OleDbType.VarWChar,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.BID;
     parameters[5].Value = model.HistorySigns;
     parameters[6].Value = model.LaboratoryExamination;
     parameters[7].Value = model.Diagnosis;
     parameters[8].Value = model.Purpose;
     parameters[9].Value = model.Results;
     if (model.BImage == null)
     {
         parameters[10].Value = DBNull.Value;
     }
     else
     {
         parameters[10].Value = model.BImage;
     }
     parameters[11].Value = model.Physicians;
     return OleDbHelper.ExecuteSql(Add_SQL, parameters);
 }
Esempio n. 3
0
 public ReturnValue AddUpdateBexamination(Bexamination model)
 {
     BLL_Bexamination bll = new BLL_Bexamination();
     return bll.AddUpdate(model);
 }
Esempio n. 4
0
 public ReturnValue Update(Bexamination model)
 {
     SqlParameter[] parametersUpdate = {
             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("@BID", SqlDbType.NVarChar,10),
             new SqlParameter("@HistorySigns", SqlDbType.NVarChar,256),
             new SqlParameter("@LaboratoryExamination", SqlDbType.NVarChar,256),
             new SqlParameter("@Diagnosis", SqlDbType.NVarChar,256),
             new SqlParameter("@Purpose", SqlDbType.NVarChar,256),
             new SqlParameter("@Results", SqlDbType.NVarChar,256),
             new SqlParameter("@BImage", SqlDbType.Image),
             new SqlParameter("@Physicians", SqlDbType.NVarChar,50)};
     parametersUpdate[0].Value = model.UPDATER_ID;
     parametersUpdate[1].Value = model.TERMINAL_CD;
     parametersUpdate[2].Value = model.EmployeeID;
     parametersUpdate[3].Value = model.YearMonth;
     parametersUpdate[4].Value = model.BID;
     parametersUpdate[5].Value = model.HistorySigns;
     parametersUpdate[6].Value = model.LaboratoryExamination;
     parametersUpdate[7].Value = model.Diagnosis;
     parametersUpdate[8].Value = model.Purpose;
     parametersUpdate[9].Value = model.Results;
     if (model.BImage == null)
     {
         parametersUpdate[10].Value = DBNull.Value;
     }
     else
     {
         parametersUpdate[10].Value = model.BImage;
     }
     parametersUpdate[11].Value = model.Physicians;
     return SqlHelper.ExecuteSql(Update_SQL, parametersUpdate);
 }