コード例 #1
0
        //判斷上架料位是否存在和被佔用
        public HttpResponseBase Islocid()
        {
            string jsonStr = String.Empty;
            try
            {
                string id = Request.Params["plas_loc_id"].ToString().ToString().ToUpper();//料位 
                string zid = Request.Params["loc_id"].ToString().ToString().ToUpper();//主料位
                string prod_id = Request.Params["prod_id"].ToString();//商品編號
                _iinvd = new IinvdMgr(mySqlConnectionString);
                int msg = _iinvd.Islocid(id, zid, prod_id);

                jsonStr = "{success:true,msg:" + msg + "}";//返回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);
                jsonStr = "{success:false}";
            }
            this.Response.Clear();
            this.Response.Write(jsonStr.ToString());
            this.Response.End();
            return this.Response;
        }