Example #1
0
 /// <summary>
 /// 執行核銷動作
 /// </summary>
 /// <returns></returns>
 public HttpResponseBase DoTicketVerification()
 {
     string json = "{success:false}";
     try
     {
         if (!string.IsNullOrEmpty(Request.Params["ticketId"]))
         {
             _courseTicketMgr = new CourseTicketMgr(mySqlConnectionString);
             CourseTicket store = _courseTicketMgr.Query(new CourseTicket { ticket_id = Convert.ToInt32(Request.Params["ticketId"]) }).FirstOrDefault();
             store.modify_date = DateTime.Now;
             store.modify_user = (Session["caller"] as Caller).user_id;
             if (_courseTicketMgr.TicketVerification(store, 1))//供應商為2,管理員為1
             {
                 json = "{success:true}";
             }
         }
     }
     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);
     }
     this.Response.Clear();
     this.Response.Write(json);
     this.Response.End();
     return this.Response;
 }