Beispiel #1
0
        /// <summary>
        /// 訂單詳情頁面列表核銷功能
        /// </summary>
        /// <returns></returns>
        public HttpResponseBase UpdateTicketStatus()
        {

            //更改course_ticket表中的flag欄位
            string json = string.Empty;
            try
            {
                string Row_id = "";
                if (!string.IsNullOrEmpty(Request.Params["rowId"]))
                {
                    Row_id = Request.Params["rowId"];
                    Row_id = Row_id.TrimEnd(',');
                    //query.map_id_in = Row_id;
                }
                _ITicketDetail = new TicketDetailMgr(mySqlConnectionString);
                int result = _ITicketDetail.UpdateTicketStatus(Row_id);
                if (result > 0)
                {
                    json = "{success:true,msg:\"" + result + "\"}";
                }
                else
                {
                    json = "{success:false,msg:\"" + result + "\"}";
                }
            }
            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,msg:'0'}";
            }
            this.Response.Clear();
            this.Response.Write(json);
            this.Response.End();
            return this.Response;

        }