Example #1
0
        public string QueryContact()
        {
            _vendorMgr = new VendorMgr(connectionString);

            string json = string.Empty;
            json = "[]";

            try
            {
                if (!string.IsNullOrEmpty(Request.QueryString["vendor_id"]))
                {
                    Vendor ven = new Vendor();
                    ven.vendor_id = Convert.ToUInt32(Request.QueryString["vendor_id"]);
                    json = _vendorMgr.QueryContanct(ven);
                }
            }
            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 = "[]";
            }

            return json;
        }