public HttpResponseBase GetBrandID() { string json = string.Empty; try { InspectionReportQuery query = new InspectionReportQuery(); if (!string.IsNullOrEmpty(Request.Params["product_id"])) { query.product_id = Convert.ToUInt32(Request.Params["product_id"]); } if (!string.IsNullOrEmpty(Request.Params["brand_name"])) { query.brand_name = (Request.Params["brand_name"]).ToString().Trim(); query.brand_status = 1; } _inspectionReport = new BLL.gigade.Mgr.InspectionReportMgr(mySqlConnectionString); json = _inspectionReport.GetBrandID(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}"; } this.Response.Clear(); this.Response.Write(json); this.Response.End(); return this.Response; }