示例#1
0
 public int SchedulePeriodInfoUpdate(SchedulePeriodQuery query) //更新schedule_period信息
 {
     StringBuilder sql = new StringBuilder();
     query.Replace4MySQL();
     try
     {
         sql.AppendFormat("update schedule_period set schedule_code = '{0}', period_type = '{1}', period_nums = '{2}',begin_datetime='{3}',current_nums='{4}',create_user='******',change_user='******',change_time='{7}',limit_nums='{8}' where rowid='{9}' ", query.schedule_code, query.period_type, query.period_nums, query.begin_datetime, query.current_nums, query.create_user, query.change_user, CommonFunction.GetPHPTime(DateTime.Now.ToString()), query.limit_nums, query.rowid);
         return _access.execCommand(sql.ToString());
     }
     catch (Exception ex)
     {
         throw new Exception("ScheduleServiceDao-->SchedulePeriodInfoUpdate-->" + sql.ToString() + ex.Message);
     }
 }
示例#2
0
 public int SchedulePeriodInfoInsert(SchedulePeriodQuery query)//插入schedule_period信息
 {
     StringBuilder sql = new StringBuilder();
     query.Replace4MySQL();
     try
     {
         sql.Append("insert into schedule_period ( schedule_code,period_type,period_nums,current_nums,limit_nums,begin_datetime,create_user,change_user, create_time, change_time) values ");
         sql.AppendFormat("('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}')", query.schedule_code, query.period_type, query.period_nums, query.current_nums, query.limit_nums, query.begin_datetime, query.create_user, query.change_user, CommonFunction.GetPHPTime(DateTime.Now.ToString()), CommonFunction.GetPHPTime(DateTime.Now.ToString()));
         return _access.execCommand(sql.ToString());
     }
     catch (Exception ex)
     {
         throw new Exception("ScheduleServiceDao-->SchedulePeriodInfoInsert-->" + sql.ToString() + ex.Message);
     }
 }