protected void Page_Load(object sender, EventArgs e)
        {
            string redirectStr = string.Format("{0}BasicData/DeliverPlaceList.aspx", NFMT.Common.DefaultValue.NftmSiteName);
            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
            NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

            if (!IsPostBack)
            {
                Utility.VerificationUtility ver = new Utility.VerificationUtility();
                ver.JudgeOperate(this.Page, 97, new List<NFMT.Common.OperateEnum>() { NFMT.Common.OperateEnum.修改 });

                this.navigation1.Routes.Add("交货地管理", redirectStr);
                this.navigation1.Routes.Add("交货地修改", string.Empty);

                this.hidBDStyleId.Value = ((int)NFMT.Data.StyleEnum.交货地类型).ToString();

                int dPId = 0;
                if (string.IsNullOrEmpty(Request.QueryString["id"]) || !int.TryParse(Request.QueryString["id"], out dPId) || dPId <= 0)
                    Response.Redirect(redirectStr);

                NFMT.Data.BLL.DeliverPlaceBLL deliverPlaceBLL = new NFMT.Data.BLL.DeliverPlaceBLL();
                result = deliverPlaceBLL.Get(user, dPId);
                if (result.ResultStatus != 0)
                    Response.Redirect(redirectStr);

                deliverPlace = result.ReturnValue as NFMT.Data.Model.DeliverPlace;
                if (deliverPlace == null)
                    Response.Redirect(redirectStr);
            }
        }
        public void ProcessRequest(HttpContext context)
        {
            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
            context.Response.ContentType = "text/plain";

            int id = 0;
            int operateId = 0;

            if (!int.TryParse(context.Request.Form["id"], out id) || id <= 0)
            {
                context.Response.Write("序号错误");
                context.Response.End();
            }

            if (!int.TryParse(context.Request.Form["oi"], out operateId) || operateId <= 0)
            {
                context.Response.Write("操作错误");
                context.Response.End();
            }

            NFMT.Data.BLL.DeliverPlaceBLL bll = new NFMT.Data.BLL.DeliverPlaceBLL();
            NFMT.Data.Model.DeliverPlace deliverPlace = new NFMT.Data.Model.DeliverPlace()
            {
                DPId = id,
                LastModifyId = user.EmpId
            };

            NFMT.Common.OperateEnum operateEnum = (NFMT.Common.OperateEnum)operateId;
            NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

            switch (operateEnum)
            {
                case NFMT.Common.OperateEnum.冻结:
                    result = bll.Freeze(user, deliverPlace);
                    break;
                case NFMT.Common.OperateEnum.解除冻结:
                    result = bll.UnFreeze(user, deliverPlace);
                    break;
            }
            if (result.ResultStatus == 0)
                result.Message = string.Format("{0}成功", operateEnum.ToString());

            context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
        }