//schedule_master 中的狀態啟用 public HttpResponseBase UpdateStats_Schedule_master() { string json = string.Empty; try { _secheduleServiceMgr = new ScheduleServiceMgr(mySqlConnectionString); ScheduleMasterQuery query = new ScheduleMasterQuery(); if (!string.IsNullOrEmpty(Request.Params["id"])) { query.rowid = Convert.ToInt32(Request.Params["id"]); } if (!string.IsNullOrEmpty(Request.Params["active"])) { query.schedule_state = Convert.ToInt32(Request.Params["active"]); } query.change_user = (System.Web.HttpContext.Current.Session["caller"] as Caller).user_id; json = _secheduleServiceMgr.UpdateStats_Schedule_master(query); } catch (Exception ex) { Log4NetCustom.LogMessage logMessage = new Log4NetCustom.LogMessage(); logMessage.Content = string.Format("TargetSite:{0},Source:{1},Message:{2}", ex.TargetSite.Name, ex.Source, ex.Message); logMessage.MethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; log.Error(logMessage); json = "{success:false,totalCount:0,data:[]}"; } this.Response.Clear(); this.Response.Write(json); this.Response.End(); return this.Response; }