Пример #1
0
 public ReturnValue Update(MedicalItems model)
 {
     OleDbParameter[] parameters = {
         new OleDbParameter("@FinanceID", OleDbType.VarWChar,1),
         new OleDbParameter("@Name", OleDbType.VarWChar,255),
         new OleDbParameter("@Units", OleDbType.VarWChar,50),
         new OleDbParameter("@Limit0", OleDbType.Integer),
         new OleDbParameter("@Limit1", OleDbType.Integer),
         new OleDbParameter("@Limit2", OleDbType.Integer),
         new OleDbParameter("@Limit3", OleDbType.Integer),
         new OleDbParameter("@Connotation", OleDbType.VarWChar,255),
         new OleDbParameter("@ExceptContents", OleDbType.VarWChar,255),
         new OleDbParameter("@Description", OleDbType.VarWChar,255),
         new OleDbParameter("@Code", OleDbType.VarWChar,10)};
     parameters[0].Value = model.Code;
     parameters[1].Value = model.FinanceID;
     parameters[2].Value = model.Name;
     parameters[3].Value = model.Units;
     parameters[4].Value = model.Limit0;
     parameters[5].Value = model.Limit1;
     parameters[6].Value = model.Limit2;
     parameters[7].Value = model.Limit3;
     parameters[8].Value = model.Connotation;
     parameters[9].Value = model.ExceptContents;
     parameters[10].Value = model.Description;
     return OleDbHelper.ExecuteSql(Update_SQL, parameters);
 }
Пример #2
0
 public ReturnValue Update(MedicalItems model)
 {
     SqlParameter[] parameters = {
         new SqlParameter("@UPDATER_ID", SqlDbType.NVarChar,12),
         new SqlParameter("@TERMINAL_CD", SqlDbType.NVarChar,255),
         new SqlParameter("@FinanceID", SqlDbType.NVarChar,1),
         new SqlParameter("@Name", SqlDbType.NVarChar,255),
         new SqlParameter("@Units", SqlDbType.NVarChar,50),
         new SqlParameter("@Limit0", SqlDbType.Int),
         new SqlParameter("@Limit1", SqlDbType.Int),
         new SqlParameter("@Limit2", SqlDbType.Int),
         new SqlParameter("@Limit3", SqlDbType.Int),
         new SqlParameter("@Connotation", SqlDbType.NVarChar,255),
         new SqlParameter("@ExceptContents", SqlDbType.NVarChar,255),
         new SqlParameter("@Description", SqlDbType.NVarChar,255),
         new SqlParameter("@Code", SqlDbType.NVarChar,10)};
     parameters[0].Value = model.UPDATER_ID;
     parameters[1].Value = model.TERMINAL_CD;
     parameters[2].Value = model.Code;
     parameters[3].Value = model.FinanceID;
     parameters[4].Value = model.Name;
     parameters[5].Value = model.Units;
     parameters[6].Value = model.Limit0;
     parameters[7].Value = model.Limit1;
     parameters[8].Value = model.Limit2;
     parameters[9].Value = model.Limit3;
     parameters[10].Value = model.Connotation;
     parameters[11].Value = model.ExceptContents;
     parameters[12].Value = model.Description;
     return SqlHelper.ExecuteSql(Update_SQL, parameters);
 }
Пример #3
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public ReturnValue AddUpdate(MedicalItems model)
 {
     ReturnValue resoult = dalMedicalItems.Search(model.Code);
     if (!resoult.ErrorFlag)
     {
         return resoult;
     }
     if (resoult.Count > 0)
     {
         resoult = dalMedicalItems.Update(model);
     }
     else
     {
         resoult = dalMedicalItems.Add(model);
     }
     return resoult;
 }