public string QueryClassBrand() { string json = string.Empty; try { uint cid = 0; VendorBrand vb = new VendorBrand(); VendorBrandMgr vbMgr = new VendorBrandMgr(connectionString); //Edit By Castle //Date:2014/07/01 //Discription:Brand_status是给前台用的后台不做限制 vb.Brand_Status = 0; //vb.Brand_Status = 1; if (!string.IsNullOrEmpty(Request.Form["topValue"])) { cid = Convert.ToUInt32(Request.Form["topValue"]); } json = vbMgr.QueryClassBrand(vb, cid); } 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); } return json; }
public string QueryBrand() { string json = string.Empty; try { uint cid = 0; int isShowGrade = 0; VendorBrandMgr vbMgr = new VendorBrandMgr(mySqlConnectionString); if (!string.IsNullOrEmpty(Request.Params["class_id"])) { cid = Convert.ToUInt32(Request.Params["class_id"]); } if (!string.IsNullOrEmpty(Request.Params["isShowGrade"])) { isShowGrade = Convert.ToInt32(Request.Params["isShowGrade"]); } json = vbMgr.QueryClassBrand(new VendorBrand { }, cid, isShowGrade);//參1:品牌條件 參2:館別條件 參3:失格供應商下是否顯示 } 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); } return json; }