Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            tourBll = new EyouSoft.BLL.TourStructure.Tour(this.SiteUserInfo);

            #region 权限验证
            //单项服务删除权限
            if (!CheckGrant(TravelPermission.单项服务_单项服务_删除服务))
            {
                this.linkDelete.Visible = false;
                DeleteFlag = false;
            }
            //单项服务修改权限
            if (!CheckGrant(TravelPermission.单项服务_单项服务_修改服务))
            {
                this.linkUpdate.Visible = false;
                EditFlag = false;
            }
            //单项服务新增权限
            if (!CheckGrant(TravelPermission.单项服务_单项服务_新增服务))
            {
                this.linkAdd.Visible = false;
                AddFlag = false;
            }
            #endregion

            #region 项模板列删除
            DeleteId = Request.QueryString["DeleteId"];
            if (DeleteId != "" && Request.QueryString["DeleteId"] != null)//删除ID
            {
                //调用删除的方法
                if (tourBll.Delete(DeleteId))
                {
                    Response.Clear();
                    Response.Write("1");
                    Response.End();
                }
            }
            #endregion

            if (!IsPostBack)
            {
                ////判断权限
                if (!CheckGrant(TravelPermission.单项服务_单项服务_栏目))
                {
                    Utils.ResponseNoPermit(TravelPermission.单项服务_单项服务_栏目, true);
                    return;
                }
                //绑定列表
                BindSingleServeList();
            }
        }
Esempio n. 2
0
        protected void linkDelete_Click(object sender, EventArgs e)
        {
            bool Result = false;

            string[] ckVals = Utils.GetFormValues("ckSingleServe");
            if (ckVals.Length == 0)
            {
                Utils.ShowAndRedirect("订单状态已经提交到财务,不能删除!", "/SingleServe/SingleServeList.aspx");
            }
            if (ckVals.Length > 0)
            {
                for (int i = 0; i < ckVals.Length; i++)
                {
                    Result = tourBll.Delete(ckVals[i]);
                }
            }
            Utils.ShowAndRedirect(Result ? "删除成功!" : "删除失败!", "/SingleServe/SingleServeList.aspx");
        }
Esempio n. 3
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string type = Utils.GetQueryStringValue("type");

            //登录公司ID
            EyouSoft.SSOComponent.Entity.UserInfo userModel = EyouSoft.Security.Membership.UserProvider.GetUser();
            //如果公司ID为0表示没有公司登录 并返回false
            if (userModel == null)
            {
                context.Response.Write("{Islogin:false}");
                return;
            }
            //声明bll对象
            EyouSoft.BLL.TourStructure.Tour bllOrder = new EyouSoft.BLL.TourStructure.Tour();
            if (type != "")
            {
                if (type == "Delete")
                {
                    string   idList = Utils.GetQueryStringValue("idList");
                    string[] list   = idList.Split(',');
                    if (list.Count() > 0)
                    {
                        for (int i = 0; i < list.Count(); i++)
                        {
                            if (list[i].Trim() != "")
                            {
                                //删除
                                bllOrder.Delete(list[i]);
                            }
                        }
                    }
                    context.Response.Write("OK");
                }
            }
        }