public ReturnValue Update(YearMonth model) { OleDbParameter[] parameters = { new OleDbParameter("@YMonth", OleDbType.VarWChar,6)}; parameters[0].Value = model.YMonth; return OleDbHelper.ExecuteSql(Update_SQL, parameters); }
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); }
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); }
/// <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; }