Exemplo n.º 1
0
 public HttpResponseBase AboutItemidLocid()
 {
     string json = string.Empty;
     Iinvd invd = new Iinvd();
     int result = 0;
     try
     {
         invd.plas_loc_id = Request.Params["tloc_id"].ToUpper();
         invd.item_id = Convert.ToUInt32(Request.Params["titem_id"]);
         _iinvd = new IinvdMgr(mySqlConnectionString);
         result = _iinvd.AboutItemidLocid(invd);
         if (result > 0)
         {
             json = "{success:true}";//返回json數據
         }
         else
         {
             json = "{success:true,msg:0}";//返回json數據
         }
     }
     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;
 }