Пример #1
0
 /// <summary>
 /// AddUpdate
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public ReturnValue AddUpdate(Xray model)
 {
     ReturnValue resoult = dalXray.Search(model.EmployeeID, model.YearMonth);
     if (!resoult.ErrorFlag)
     {
         return resoult;
     }
     if (resoult.Count > 0)
     {
         resoult = dalXray.Update(model);
         if (resoult.ErrorFlag)
         {
             BLL_Log.AddLog(model.UPDATER_ID + " 修改了用户 " + model.EmployeeID + " 的X射线信息", "1", model.TERMINAL_CD);
         }
     }
     else
     {
         resoult = dalXray.Add(model);
         if (resoult.ErrorFlag)
         {
             BLL_Log.AddLog(model.UPDATER_ID + " 修改了用户 " + model.EmployeeID + " 的X射线信息", "1", model.TERMINAL_CD);
         }
     }
     return resoult;
 }
Пример #2
0
 public ReturnValue Add(Xray 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("@PhotoNo", SqlDbType.NVarChar,10),
             new SqlParameter("@Symptoms", SqlDbType.NVarChar,256),
             new SqlParameter("@Laboratory", SqlDbType.NVarChar,256),
             new SqlParameter("@Diagnosis", SqlDbType.NVarChar,256),
             new SqlParameter("@Perspective", SqlDbType.NVarChar,256),
             new SqlParameter("@Camera", SqlDbType.NVarChar,256),
             new SqlParameter("@Results", SqlDbType.NVarChar,1024),
             new SqlParameter("@XImage", SqlDbType.Image),
             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.PhotoNo;
     parameters[5].Value = model.Symptoms;
     parameters[6].Value = model.Laboratory;
     parameters[7].Value = model.Diagnosis;
     parameters[8].Value = model.Perspective;
     parameters[9].Value = model.Camera;
     parameters[10].Value = model.Results;
     if (model.XImage == null)
     {
         parameters[11].Value = DBNull.Value;
     }
     else
     {
         parameters[11].Value = model.XImage;
     }
     parameters[12].Value = model.Physicians;
     return SqlHelper.ExecuteSql(Add_SQL, parameters);
 }
Пример #3
0
 public ReturnValue AddUpdateXray(Xray model)
 {
     BLL_Xray bll = new BLL_Xray();
     return bll.AddUpdate(model);
 }
Пример #4
0
 public ReturnValue Update(Xray model)
 {
     OleDbParameter[] parametersUpdate = {
             new OleDbParameter("@UPDATER_ID", OleDbType.VarWChar,12),
             new OleDbParameter("@TERMINAL_CD", OleDbType.LongVarWChar),
             new OleDbParameter("@PhotoNo", OleDbType.VarWChar,10),
             new OleDbParameter("@Symptoms", OleDbType.LongVarWChar),
             new OleDbParameter("@Laboratory", OleDbType.LongVarWChar),
             new OleDbParameter("@Diagnosis", OleDbType.LongVarWChar),
             new OleDbParameter("@Perspective", OleDbType.LongVarWChar),
             new OleDbParameter("@Camera", OleDbType.LongVarWChar),
             new OleDbParameter("@Results", OleDbType.LongVarWChar),
             new OleDbParameter("@XImage", OleDbType.LongVarBinary),
             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.PhotoNo;
     parametersUpdate[3].Value = model.Symptoms;
     parametersUpdate[4].Value = model.Laboratory;
     parametersUpdate[5].Value = model.Diagnosis;
     parametersUpdate[6].Value = model.Perspective;
     parametersUpdate[7].Value = model.Camera;
     parametersUpdate[8].Value = model.Results;
     if (model.XImage == null)
     {
         parametersUpdate[9].Value = DBNull.Value;
     }
     else
     {
         parametersUpdate[9].Value = model.XImage;
     }
     parametersUpdate[10].Value = model.Physicians;
     parametersUpdate[11].Value = model.EmployeeID;
     parametersUpdate[12].Value = model.YearMonth;
     return OleDbHelper.ExecuteSql(Update_SQL, parametersUpdate);
 }