示例#1
0
 public ReturnValue Update(YearMonth model)
 {
     OleDbParameter[] parameters = {
             new OleDbParameter("@YMonth", OleDbType.VarWChar,6)};
     parameters[0].Value = model.YMonth;
     return OleDbHelper.ExecuteSql(Update_SQL, parameters);
 }
示例#2
0
 public ReturnValue Add(YearMonth model)
 {
     OleDbParameter[] parameters = {
             new OleDbParameter("@UPDATER_ID", OleDbType.VarWChar,12),
             new OleDbParameter("@TERMINAL_CD", OleDbType.LongVarWChar),
             new OleDbParameter("@YMonth", OleDbType.VarWChar,6)};
     parameters[0].Value = model.UPDATER_ID;
     parameters[1].Value = model.TERMINAL_CD;
     parameters[2].Value = model.YMonth;
     return OleDbHelper.ExecuteSql(Add_SQL, parameters);
 }
示例#3
0
 public ReturnValue Update(YearMonth model)
 {
     SqlParameter[] parameters = {
             new SqlParameter("@UPDATER_ID", SqlDbType.NVarChar,12),
             new SqlParameter("@TERMINAL_CD", SqlDbType.NVarChar,255),
             new SqlParameter("@YMonth", SqlDbType.NVarChar,6)};
     parameters[0].Value = model.UPDATER_ID;
     parameters[1].Value = model.TERMINAL_CD;
     parameters[2].Value = model.YMonth;
     return SqlHelper.ExecuteSql(Update_SQL, parameters);
 }
示例#4
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public ReturnValue AddUpdate(YearMonth model)
 {
     ReturnValue resoult = dalYearMonth.Search(model.YMonth);
     if (!resoult.ErrorFlag)
     {
         return resoult;
     }
     if (resoult.Count > 0)
     {
         resoult = dalYearMonth.Update(model);
     }
     else
     {
         resoult = dalYearMonth.Add(model);
     }
     return resoult;
 }