Exemplo n.º 1
0
 public ReturnValue AddUpdate(Report model)
 {
     ReturnValue resoult = dalReport.Search(model.EmployeeID,model.YearMonth);
     if (!resoult.ErrorFlag)
     {
         return resoult;
     }
     if (resoult.Count > 0)
     {
         resoult = dalReport.Update(model);
         if (resoult.ErrorFlag)
         {
             BLL_Log.AddLog(model.UPDATER_ID + " 修改了用户 " + model.EmployeeID + " 的体检报告信息", "1", model.TERMINAL_CD);
         }
     }
     else
     {
         resoult = dalReport.Add(model);
         if (resoult.ErrorFlag)
         {
             BLL_Log.AddLog(model.UPDATER_ID + " 修改了用户 " + model.EmployeeID + " 的体检报告信息", "1", model.TERMINAL_CD);
         }
     }
     return resoult;
 }
Exemplo n.º 2
0
 public ReturnValue Update(Report model)
 {
     OleDbParameter[] parametersUpdate = {
             new OleDbParameter("@UPDATER_ID", OleDbType.VarWChar,12),
             new OleDbParameter("@TERMINAL_CD", OleDbType.LongVarWChar),
             new OleDbParameter("@ChestPerspective", OleDbType.LongVarWChar),
             new OleDbParameter("@Laboratory", OleDbType.LongVarWChar),
             new OleDbParameter("@Review", OleDbType.LongVarWChar),
             new OleDbParameter("@Remarks", OleDbType.LongVarWChar),
             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.ChestPerspective;
     parametersUpdate[3].Value = model.Laboratory;
     parametersUpdate[4].Value = model.Review;
     parametersUpdate[5].Value = model.Remarks;
     parametersUpdate[6].Value = model.EmployeeID;
     parametersUpdate[7].Value = model.YearMonth;
     return OleDbHelper.ExecuteSql(Update_SQL, parametersUpdate);
 }
Exemplo n.º 3
0
 public ReturnValue Add(Report 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("@ChestPerspective", SqlDbType.NVarChar,256),
             new SqlParameter("@Laboratory", SqlDbType.NVarChar,256),
             new SqlParameter("@Review", SqlDbType.NVarChar,1024),
             new SqlParameter("@Remarks", SqlDbType.NVarChar,1024)};
     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.ChestPerspective;
     parameters[5].Value = model.Laboratory;
     parameters[6].Value = model.Review;
     parameters[7].Value = model.Remarks;
     return SqlHelper.ExecuteSql(Add_SQL, parameters);
 }