Ejemplo n.º 1
0
        /// <summary>
        /// 初始化列表
        /// </summary>
        private void InitList()
        {
            EyouSoft.Model.CompanyStructure.QueryParamsUser query = new EyouSoft.Model.CompanyStructure.QueryParamsUser();
            query.IsShowAdmin = true;
            IList <EyouSoft.Model.CompanyStructure.CompanyUserBase> userList = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance().GetList(SiteUserInfo.CompanyID, query);

            query = null;
            if (userList != null && userList.Count > 0)
            {
                IList <EyouSoft.Model.SystemStructure.AreaBase> areaList = EyouSoft.BLL.CompanyStructure.CompanyArea.CreateInstance().GetCompanyArea(SiteUserInfo.CompanyID);
                if (areaList != null && areaList.Count > 0)
                {
                    this.RepeaterList.DataSource = areaList;
                    this.RepeaterList.DataBind();

                    //获得已选中的用户ID
                    IList <EyouSoft.Model.MQStructure.IMAcceptMsgPeople> selectedUserList = EyouSoft.BLL.MQStructure.IMAcceptMsgPeople.CreateInstance().GetAcceptMsgList(SiteUserInfo.CompanyID, null, 0);

                    //注册js
                    StringBuilder scripts = new StringBuilder();
                    scripts.AppendFormat("SetMQMsgUser.Config.CompanyId=\"{0}\";", SiteUserInfo.CompanyID);
                    scripts.AppendFormat("SetMQMsgUser.Config.UserList={0};", Newtonsoft.Json.JsonConvert.SerializeObject(userList));
                    scripts.AppendFormat("SetMQMsgUser.Config.AreaList={0};", Newtonsoft.Json.JsonConvert.SerializeObject(areaList));
                    scripts.AppendFormat("SetMQMsgUser.Config.SelectedUserList={0};", Newtonsoft.Json.JsonConvert.SerializeObject(selectedUserList));
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), scripts.ToString(), true);
                }
                areaList = null;
            }

            userList = null;
        }
Ejemplo n.º 2
0
        private void SelectAllContactInfo()
        {
            Response.Clear();
            EyouSoft.IBLL.CompanyStructure.ICompanyUser bll = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance();

            string strContactName = string.Empty;

            if (!String.IsNullOrEmpty(Utils.GetFormValue("ContactName")))   // 输入筛选
            {
                strContactName = Utils.GetFormValue("ContactName");
            }
            StringBuilder str = new StringBuilder();

            EyouSoft.Model.CompanyStructure.QueryParamsUser param = new EyouSoft.Model.CompanyStructure.QueryParamsUser();
            param.UserName    = strContactName;
            param.IsShowAdmin = true;
            IList <EyouSoft.Model.CompanyStructure.CompanyUserBase> list = bll.GetList(CompanyID, param);

            if (list != null && list.Count > 0)
            {
                foreach (EyouSoft.Model.CompanyStructure.CompanyUserBase model in list)
                {
                    str.Append(model.ContactInfo.ContactName + "~&&~" + model.ContactInfo.Tel + "~&&~" + model.ContactInfo.MQ + "~&&~" + model.UserName + "\n");
                }
            }
            list = null;
            bll  = null;
            Response.Write(str.ToString());
            Response.End();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 初始化页面
        /// </summary>
        protected void initPage()
        {
            BindProvince();
            //绑定景区等级
            this.ScenicLevel.DataSource     = EyouSoft.Common.EnumObj.GetList(typeof(EyouSoft.Model.ScenicStructure.ScenicLevel));
            this.ScenicLevel.DataTextField  = "Text";
            this.ScenicLevel.DataValueField = "Value";
            this.ScenicLevel.DataBind();
            this.ScenicLevel.Items.Insert(0, new ListItem("请选择", "0"));

            //绑定联系人
            EyouSoft.Model.CompanyStructure.QueryParamsUser QueryParams = new EyouSoft.Model.CompanyStructure.QueryParamsUser();
            QueryParams.IsShowAdmin = true;
            IList <EyouSoft.Model.CompanyStructure.CompanyUserBase> contactOperator = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance().GetList(CompanyId, QueryParams);

            //  "00005578-903A-4E65-8B2D-2EAB3A21D5CE"
            string selectValue = "";

            foreach (var item in contactOperator)
            {
                ListItem li = new ListItem();
                li.Text  = item.ContactInfo.ContactName + " | " + item.UserName;
                li.Value = item.ID;
                if (item.IsAdmin)
                {
                    selectValue = item.ID;
                }
                this.ContactOperator.Items.Add(li);
            }
            this.ContactOperator.Items[Utils.GetInt(selectValue)].Selected = true;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 获取指定公司下的所有子帐号用户详细信息列表[注;不包括总帐号]
        /// </summary>
        /// <param name="companyId">公司ID</param>
        /// <param name="pageSize">分页大小</param>
        /// <param name="pageIndex">当前页</param>
        /// <param name="recordCount">总的记录数</param>
        /// <returns></returns>
        public IList <EyouSoft.Model.CompanyStructure.CompanyUser> GetList(string companyId, int pageSize, int pageIndex, ref int recordCount)
        {
            EyouSoft.Model.CompanyStructure.QueryParamsUser Params = new EyouSoft.Model.CompanyStructure.QueryParamsUser();

            IList <EyouSoft.Model.CompanyStructure.CompanyUser> items = idal.GetList(companyId, Params, pageSize, pageIndex, ref recordCount);

            return(GetUserArea(items));;
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 初始化公司用户
        /// </summary>
        private void InitCompanyUser()
        {
            var qmodel = new EyouSoft.Model.CompanyStructure.QueryParamsUser {
                IsShowAdmin = true
            };
            var userList = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance().GetList(master.CompanyId, qmodel);

            rptCompanyUser.DataSource = userList;
            rptCompanyUser.DataBind();
        }
Ejemplo n.º 6
0
 /// <summary>
 /// 获取指定公司下的所有帐号用户基本信息列表
 /// </summary>
 /// <param name="companyId">公司ID</param>
 /// <param name="queryParams">查询参数实体</param>
 /// <returns></returns>
 public IList <EyouSoft.Model.CompanyStructure.CompanyUserBase> GetList(string companyId, EyouSoft.Model.CompanyStructure.QueryParamsUser queryParams)
 {
     return(idal.GetList(companyId, queryParams));
 }
Ejemplo n.º 7
0
 /// <summary>
 /// 获取指定公司下的所有子帐号用户基本信息列表[注;不包括总帐号]
 /// </summary>
 /// <param name="companyId">公司ID</param>
 /// <returns></returns>
 public IList <EyouSoft.Model.CompanyStructure.CompanyUserBase> GetList(string companyId)
 {
     EyouSoft.Model.CompanyStructure.QueryParamsUser Params = new EyouSoft.Model.CompanyStructure.QueryParamsUser();
     return(idal.GetList(companyId, Params));
 }
Ejemplo n.º 8
0
        /// <summary>
        /// 保存按钮事件
        /// </summary>
        protected void SaveDate(object sender, EventArgs e)
        {
            string action    = Utils.GetQueryStringValue("action").ToLower(); //行为 add、edit
            string ticketId  = Utils.GetQueryStringValue("id");               //门票编号
            string companyId = Utils.GetQueryStringValue("cid");              //公司编号
            string scenicId  = Utils.GetQueryStringValue("sid");              //景区编号

            if (string.IsNullOrEmpty(action))
            {
                EyouSoft.Common.Function.MessageBox.ShowAndRedirect(this, "参数丢失", "/ScenicManage/ScenicTicket.aspx");
                return;
            }

            if (action == "edit")
            {
                if (string.IsNullOrEmpty(ticketId) || string.IsNullOrEmpty(companyId))
                {
                    EyouSoft.Common.Function.MessageBox.ShowAndRedirect(this, "参数丢失", "/ScenicManage/ScenicTicket.aspx");
                    return;
                }
            }
            else
            {
                if (string.IsNullOrEmpty(scenicId) || string.IsNullOrEmpty(companyId))
                {
                    EyouSoft.Common.Function.MessageBox.ShowAndRedirect(this, "参数丢失", "/ScenicManage/ScenicList.aspx");
                    return;
                }
            }

            string  strName = Utils.GetFormValue(txtName.UniqueID, 20);
            decimal msPrice = Utils.GetDecimal(Utils.GetFormValue(txtMSPrice.UniqueID));
            decimal yhPrice = Utils.GetDecimal(Utils.GetFormValue(txtWZPrice.UniqueID));
            decimal zdPrice = Utils.GetDecimal(Utils.GetFormValue(txtSCPrice.UniqueID));
            decimal thPrice = Utils.GetDecimal(Utils.GetFormValue(txtTHPrice.UniqueID));
            int     payType = Utils.GetInt(Utils.GetFormValue(rblPayment.UniqueID));
            //同业价 < 最低限价 < 优惠价 < 门市价
            string strErr = string.Empty;

            if (string.IsNullOrEmpty(strName))
            {
                strErr += "门票类型名称不能为空 \\n";
            }
            if (msPrice <= 0)
            {
                strErr += "门市价必须为大于0的数字 \\n";
            }
            if (payType <= 0)
            {
                strErr += "支付方式必须选择 \\n";
            }
            if (thPrice > zdPrice)
            {
                strErr += "同业价必须小于等于最低限价 \\n";
            }
            if (zdPrice > yhPrice)
            {
                strErr += "最低限价必须小于等于优惠价 \\n";
            }
            if (yhPrice > msPrice)
            {
                strErr += "优惠价必须小于等于门市价 \\n";
            }


            if (!string.IsNullOrEmpty(strErr))
            {
                EyouSoft.Common.Function.MessageBox.ShowAndReturnBack(this, strErr, 1);
                return;
            }

            var model = new EyouSoft.Model.ScenicStructure.MScenicTickets
            {
                TicketsId = ticketId,
                CompanyId = companyId,
                B2B       =
                    (EyouSoft.Model.ScenicStructure.ScenicB2BDisplay)
                    Utils.GetInt(Utils.GetFormValue(ddlB2B.UniqueID)),
                B2BOrder = Utils.GetInt(Utils.GetFormValue(txtB2BSort.UniqueID), 50),
                B2C      =
                    (EyouSoft.Model.ScenicStructure.ScenicB2CDisplay)
                    Utils.GetInt(Utils.GetFormValue(ddlB2C.UniqueID)),
                B2COrder          = Utils.GetInt(Utils.GetFormValue(txtB2CSort.UniqueID), 50),
                CustomOrder       = Utils.GetInt(Utils.GetFormValue(txtSort.UniqueID), 9),
                Description       = Utils.GetFormValue(txtDescription.UniqueID, 500),
                DistributionPrice = thPrice,
                EnName            = Utils.GetFormValue(txtEnName.UniqueID),
                EndTime           = Utils.GetDateTimeNullable(Utils.GetFormValue(txtEndDate.UniqueID)),
                RetailPrice       = msPrice,
                WebsitePrices     = yhPrice,
                MarketPrice       = zdPrice,
                Limit             = Utils.GetInt(Utils.GetFormValue(txtLimit.UniqueID)),
                StartTime         = Utils.GetDateTimeNullable(Utils.GetFormValue(txtStartDate.UniqueID)),
                SaleDescription   = Utils.GetFormValue(txtSaleDescription.UniqueID, 500),
                ScenicId          = Utils.GetFormValue(ddlSight.UniqueID),
                Payment           = (EyouSoft.Model.ScenicStructure.ScenicPayment)payType,
                Status            =
                    (EyouSoft.Model.ScenicStructure.ScenicTicketsStatus)
                    Utils.GetInt(Utils.GetFormValue(ddlState.UniqueID)),
                ExamineStatus =
                    (EyouSoft.Model.ScenicStructure.ExamineStatus)
                    Utils.GetInt(Utils.GetFormValue(ddlIsCheck.UniqueID)),
                TypeName = strName
            };

            if (model.ExamineStatus == EyouSoft.Model.ScenicStructure.ExamineStatus.已审核)
            {
                model.ExamineOperator = MasterUserInfo.ID;
            }

            if (action == "edit")
            {
                if (EyouSoft.BLL.ScenicStructure.BScenicTickets.CreateInstance().OperateUpdate(model))
                {
                    EyouSoft.Common.Function.MessageBox.ShowAndRedirect(this, "修改成功", "/ScenicManage/ScenicTicket.aspx");
                    return;
                }
                EyouSoft.Common.Function.MessageBox.ShowAndRedirect(this, "修改失败", "/ScenicManage/ScenicTicket.aspx");
                return;
            }
            else
            {
                model.IssueTime = DateTime.Now;

                #region 为发布人赋值

                var qmodel = new EyouSoft.Model.CompanyStructure.QueryParamsUser {
                    IsShowAdmin = true
                };
                var userList = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance().GetList(companyId, qmodel);
                if (userList != null && userList.Count > 0)
                {
                    foreach (var t in userList)
                    {
                        if (t != null && t.IsAdmin)
                        {
                            model.Operator = t.ID;
                            break;
                        }
                    }
                }
                //防止程序异常,无实际意义
                if (model.Operator == null)
                {
                    model.Operator = string.Empty;
                }

                #endregion

                if (EyouSoft.BLL.ScenicStructure.BScenicTickets.CreateInstance().OperateAdd(model))
                {
                    EyouSoft.Common.Function.MessageBox.ShowAndRedirect(this, "添加成功", "/ScenicManage/ScenicList.aspx");
                    return;
                }
                EyouSoft.Common.Function.MessageBox.ShowAndRedirect(this, "添加失败", "/ScenicManage/ScenicList.aspx");
                return;
            }
        }