Ejemplo n.º 1
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.º 2
0
        /// <summary>
        /// 初始化方法
        /// </summary>
        /// <param name="searchKey">搜索关键字</param>
        /// <param name="areaID">线路区域编号</param>
        /// <param name="begin">开始时间</param>
        /// <param name="end">结束时间</param>
        protected void DataInit(string searchKey, int areaID, string begin, string end)
        {
            pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);
            //声明bll 操作对象
            EyouSoft.IBLL.CompanyStructure.ICompanyUser cBLL = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance();
            //声明公司对象
            EyouSoft.Model.CompanyStructure.CompanyUser cModel = cBLL.GetModel(0);//SiteUserInfo.ID
            if (cModel != null && cModel.Area != null && cModel.Area.Count > 0)
            {
                //绑定公司的线路区域
                this.rptAreaList.DataSource = cModel.Area;
                this.rptAreaList.DataBind();
                //绑定下拉框线路区域
                AreaListBind(cModel.Area, areaID);
                //团号(团号参数为null则最新订单,存在团号既查询单独团号下的订单)
                string tourId = Request.QueryString["tourId"];
                #region 团查询实体赋值
                EyouSoft.Model.NewTourStructure.MTourListSearch searchModel = new EyouSoft.Model.NewTourStructure.MTourListSearch();
                searchModel.TourKey = searchKey;
                if (tourId == null)
                {
                    searchModel.TourOrderStatus = EyouSoft.Model.NewTourStructure.TourOrderStatus.未确认;
                }
                searchModel.SLeaveDate = Utils.GetDateTimeNullable(begin);
                searchModel.ELeaveDate = Utils.GetDateTimeNullable(end);
                #endregion



                //获得未处理订单的团
                EyouSoft.IBLL.NewTourStructure.ITourList tourBll = EyouSoft.BLL.NewTourStructure.BTourList.CreateInstance();

                IList <EyouSoft.Model.NewTourStructure.MPowderOrder> tourList = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance().GetNewPowderOrder(
                    pageSize,
                    pageIndex,
                    ref recordCount,
                    "",
                    //SiteUserInfo.CompanyID,
                    searchKey,
                    areaID,
                    Utils.GetDateTimeNullable(begin),
                    Utils.GetDateTimeNullable(end),
                    tourId);//团号
                if (tourList != null && tourList.Count > 0)
                {
                    this.rptList.DataSource = tourList;
                    this.rptList.DataBind();
                    BindPage();
                }
                else
                {
                    this.ExportPageInfo1.Visible = false;
                    this.litMsg.Text             = "暂无最新订单";
                }
            }
            else
            {
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 创建IBLL实例对象
 /// </summary>
 /// <returns></returns>
 public static EyouSoft.IBLL.CompanyStructure.ICompanyUser CreateInstance()
 {
     EyouSoft.IBLL.CompanyStructure.ICompanyUser op = null;
     if (op == null)
     {
         op = EyouSoft.Component.Factory.ComponentFactory.Create <EyouSoft.IBLL.CompanyStructure.ICompanyUser>();
     }
     return(op);
 }
Ejemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!CheckGrant(TravelPermission.系统设置_权限管理))
            {
                Utils.ResponseNoPermit();
                return;
            }
            if (!CheckGrant(TravelPermission.系统设置_权限管理, TravelPermission.系统设置_子账户管理))
            {
                haveUpdate = false;
            }
            EyouSoft.Model.CompanyStructure.CompanyDetailInfo companyModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(SiteUserInfo.CompanyID);
            //是否开通收费MQ
            //if (!companyModel.StateMore.CompanyService.IsServiceAvailable(EyouSoft.Model.CompanyStructure.SysService.MQ))
            //{
            //    Server.Transfer("/SystemSet/ApplyMQ.aspx");
            //    return;
            //}
            EyouSoft.Model.CompanyStructure.CompanySetting comSeting = EyouSoft.BLL.CompanyStructure.CompanySetting.CreateInstance().GetModel(SiteUserInfo.CompanyID);
            if (comSeting != null)
            {
                SonUserNumLimit = comSeting.OperatorLimit;
            }
            //是否开通专线,如果开通则显示专线区域列
            if (SiteUserInfo.CompanyRole.RoleItems.Contains(EyouSoft.Model.CompanyStructure.CompanyType.专线))
            {
                isArea = true;
            }
            sonUserBll = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance();
            pageIndex  = Utils.GetInt(Request.QueryString["Page"], 1);
            itemIndex  = (pageIndex - 1) * pageSize + 1;
            string method = Utils.GetFormValue("method");

            if (method == "del")//删除子账户
            {
                if (!haveUpdate)
                {
                    Utils.ResponseMeg(false, "对不起,你没有该权限!");
                    return;
                }
                DelSonUser();
                return;
            }
            if (method == "setforbid")//设置用户状态
            {
                if (!haveUpdate)
                {
                    Utils.ResponseMeg(false, "对不起,你没有该权限!");
                    return;
                }
                SetForbid();
                return;
            }
            userName = SiteUserInfo.UserName;
            LoadSonUserList();//绑定子账户列表
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 保存按钮Click事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            EyouSoft.Model.CompanyStructure.CompanyLogo logoInfo = new EyouSoft.Model.CompanyStructure.CompanyLogo();
            logoInfo.ImagePath = Utils.GetFormValue("FSelfLogo$hidFileName");

            EyouSoft.Model.CompanyStructure.CompanyMQAdv adInfo = new EyouSoft.Model.CompanyStructure.CompanyMQAdv();
            adInfo.ImagePath = Utils.GetFormValue("FSelfAd$hidFileName");
            adInfo.ImageLink = Utils.GetFormValue("txtPayMQSelfAdUrl").Trim();

            EyouSoft.IBLL.CompanyStructure.ICompanyUser ubll  = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance();
            EyouSoft.Model.CompanyStructure.CompanyUser uInfo = ubll.GetModel(this.SiteUserInfo.ID);

            string contactName      = Utils.GetFormValue(this.txtSelfContactName.UniqueID);             //Utils.InputText(this.txtSelfContactName.Text);
            int    contactGender    = Utils.GetInt(Utils.GetFormValue(this.rblSelfGender.UniqueID), 2); //Utils.GetInt(this.rblSelfGender.SelectedValue, 2);
            string contactTelephone = Utils.GetFormValue(this.txtSelfContactTel.UniqueID);              //Utils.InputText(this.txtSelfContactTel.Text);
            string contactMobile    = Utils.GetFormValue(this.txtSelfContactMobile.UniqueID);           //Utils.InputText(this.txtSelfContactMobile.Text);

            uInfo.ContactInfo.ContactName = string.IsNullOrEmpty(contactName) ? uInfo.ContactInfo.ContactName : contactName;
            uInfo.ContactInfo.ContactSex  = (EyouSoft.Model.CompanyStructure.Sex)contactGender;
            uInfo.ContactInfo.Tel         = string.IsNullOrEmpty(contactTelephone) ? uInfo.ContactInfo.Tel : contactTelephone;
            uInfo.ContactInfo.Mobile      = string.IsNullOrEmpty(contactMobile) ? uInfo.ContactInfo.Mobile : contactMobile;

            ubll.UpdatePersonal(uInfo);

            if (!string.IsNullOrEmpty(logoInfo.ImagePath))
            {
                EyouSoft.BLL.CompanyStructure.CompanyAttachInfo.CreateInstance().SetCompanyLogo(uInfo.CompanyID, logoInfo);
            }

            if (!string.IsNullOrEmpty(adInfo.ImagePath) || !string.IsNullOrEmpty(adInfo.ImageLink))
            {
                if (string.IsNullOrEmpty(adInfo.ImagePath))
                {
                    adInfo.ImagePath = this.txtSelfCurrentAdImgPath.Value;
                }

                if (!string.IsNullOrEmpty(adInfo.ImageLink) && !adInfo.ImageLink.StartsWith("http://"))
                {
                    adInfo.ImageLink = "http://" + adInfo.ImageLink;
                }

                EyouSoft.BLL.CompanyStructure.CompanyAttachInfo.CreateInstance().SetCompanyMQAdv(uInfo.CompanyID, adInfo);
            }

            Response.Redirect(Request.ServerVariables["SCRIPT_NAME"] + "?" + Request.QueryString);
        }
Ejemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //if (!CheckGrant(TravelPermission.系统设置_管理首页))
            //{
            //    Utils.ResponseNoPermit();
            //    return;
            //}
            if (!IsPostBack)
            {
                this.InitData();
            }
            userBll   = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance();
            userModel = userBll.GetModel(SiteUserInfo.ID);
            string method = Utils.GetFormValue("method");

            if (method == "save")
            {
                UpdatePersonInfo();//更新个人信息
                return;
            }
            LoadPersonInfo();//初始化个人信息
        }
Ejemplo n.º 7
0
        protected void UpdatePass()
        {
            if (!IsCompanyCheck)
            {
                Utils.ResponseMeg(false, "对不起,你尚未审核通过!");
                return;
            }
            string oldPass = Utils.GetFormValue("oldpass"); //换取表单原密码
            string newPass = Utils.GetFormValue("newPass"); //获取新密码

            if (oldPass == "" || newPass == "")
            {
                Utils.ResponseMegNoComplete();
            }
            else
            {
                EyouSoft.IBLL.CompanyStructure.ICompanyUser userBll = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance();
                string oldPass1 = userBll.GetModel(SiteUserInfo.ID).PassWordInfo.NoEncryptPassword;
                if (oldPass1 != oldPass)//判断原密码是否正确
                {
                    Utils.ResponseMeg(false, "原密码错误");
                }
                else
                {
                    EyouSoft.Model.CompanyStructure.PassWord pass = new EyouSoft.Model.CompanyStructure.PassWord();
                    pass.NoEncryptPassword = newPass;                  //设置新密码
                    if (userBll.UpdatePassWord(SiteUserInfo.ID, pass)) //更新密码
                    {
                        Utils.ResponseMeg(true, "修改成功!");
                    }
                    else
                    {
                        Utils.ResponseMegError();
                    }
                }
            }
        }
Ejemplo n.º 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //是否登录
            if (!IsLogin)
            {
                EyouSoft.Security.Membership.UserProvider.RedirectLoginOpenTopPage("/Default.aspx", "对不起,你尚未登录!");
                return;
            }
            if (!CheckGrant(TravelPermission.系统设置_子账户管理, TravelPermission.系统设置_权限管理))
            {
                Utils.ResponseNoPermit();
                return;
            }
            sonUserBll = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance();
            string method = Utils.GetQueryStringValue("method");

            if (method == "checkAccount")
            {
                IsIn();
                return;
            }
            string id = Utils.GetQueryStringValue("sonuserid");

            if (id != "")
            {
                sonUserModel = sonUserBll.GetModel(id);
            }
            if (!Page.IsPostBack)
            {
                haveArea = SiteUserInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.专线);
                if (id == "" || method == "copy")
                {
                    sus_txtNewPassword1.Attributes.Add("valid", "required|limit");
                    sus_txtNewPassword1.Attributes.Add("errmsg", "请填写密码|密码长度为6-16个字符");
                    sus_txtNewPassword1.Attributes.Add("custom", "SonUserSet.checkPass");
                    sus_txtNewPassword1.Attributes.Add("min", "6");
                    sus_txtNewPassword1.Attributes.Add("max", "16");
                }
                else
                {
                    sus_txtNewPassword1.Attributes.Add("valid", "limit");
                    sus_txtNewPassword1.Attributes.Add("errmsg", "密码长度为6-16个字符");
                    sus_txtNewPassword1.Attributes.Add("custom", "SonUserSet.checkPass");
                    sus_txtNewPassword1.Attributes.Add("min", "6");
                    sus_txtNewPassword1.Attributes.Add("max", "16");
                }
                BindDepartAndRole();                        //绑定部门和角色
                BindManageArea();                           //绑定经营区域
                if (method == "update" || method == "copy") //如果是修改或复制则加载初始数据
                {
                    LoadSonUser(method);
                }
            }
            if (Page.IsPostBack)
            {
                //获取子账户经营区域
                List <EyouSoft.Model.SystemStructure.AreaBase> areaList = new List <EyouSoft.Model.SystemStructure.AreaBase>();
                var keyList = Request.Form.AllKeys.Where(key => key.Contains("checkbox_Area_"));
                foreach (string k in keyList)
                {
                    EyouSoft.Model.SystemStructure.AreaBase area = new EyouSoft.Model.SystemStructure.AreaBase();
                    area.AreaId = int.Parse(Utils.GetFormValue(k));
                    areaList.Add(area);
                }
                if (method == "update")//修改子账户
                {
                    UpdateSonUser(areaList);
                }
                if (method == "add" || method == "copy")//添加子账户
                {
                    int SonUserNumLimit = 0;
                    IList <EyouSoft.Model.CompanyStructure.CompanyUser> sonUserList = sonUserBll.GetList(SiteUserInfo.CompanyID, 1, 1, ref recordCount);
                    EyouSoft.Model.CompanyStructure.CompanySetting      comSeting   = EyouSoft.BLL.CompanyStructure.CompanySetting.CreateInstance().GetModel(SiteUserInfo.CompanyID);
                    if (comSeting != null)
                    {
                        SonUserNumLimit = comSeting.OperatorLimit;
                    }
                    //if (recordCount == SonUserNumLimit)
                    //{
                    //    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script>;alert('对不起,你只能建"+SonUserNumLimit+"个账户!');if(window.parent.Boxy){window.parent.Boxy.getIframeDialog('" + Request.QueryString["iframeId"] + "').hide();}else{window.close();}</script>");
                    //    return;
                    //}
                    AddSonUser(areaList);
                }
            }
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 更新用户信息
        /// </summary>
        /// <param name="requestInfo"></param>
        /// <returns></returns>
        private EyouSoft.OpenRelation.Model.MResponseInfo UpdateUserInfo(EyouSoft.OpenRelation.Model.MRequestInfo requestInfo)
        {
            EyouSoft.OpenRelation.Model.MResponseInfo responseInfo = new EyouSoft.OpenRelation.Model.MResponseInfo()
            {
                IsSuccess = true
            };
            if (requestInfo == null)
            {
                responseInfo.IsSuccess = false;
                responseInfo.Desc      = "http request post info对象为空!";

                return(responseInfo);
            }
            EyouSoft.OpenRelation.Model.MUserInfo MiddUser = EyouSoft.OpenRelation.Utils.InvertJSON <EyouSoft.OpenRelation.Model.MUserInfo>(requestInfo.InstructionCode);
            if (MiddUser == null)
            {
                responseInfo.IsSuccess = false;
                responseInfo.Desc      = "Josn对象转为中间平台对象时发生错误!";

                return(responseInfo);
            }
            EyouSoft.IBLL.CompanyStructure.ICompanyUser UserBll   = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance();
            EyouSoft.Model.CompanyStructure.CompanyUser UserModel = UserBll.GetModel(MiddUser.PlatformUserId);
            if (UserModel == null || UserModel.ContactInfo == null)
            {
                responseInfo.IsSuccess = false;
                responseInfo.Desc      = "在平台中未找到对应的用户或者用户对应的联系人信息!";

                return(responseInfo);
            }

            //大平台邮箱不能为空 赋值空格
            if (string.IsNullOrEmpty(MiddUser.Email))
            {
                MiddUser.Email = " ";
            }

            UserModel.UserName = MiddUser.UserName.Trim();
            if (!string.IsNullOrEmpty(MiddUser.Password.Trim()))
            {
                UserModel.PassWordInfo.NoEncryptPassword = MiddUser.Password.Trim();
            }
            UserModel.ContactInfo.ContactName = MiddUser.RealName.Trim();
            UserModel.ContactInfo.ContactSex  = GetGender(MiddUser.Gender);
            UserModel.ContactInfo.Mobile      = MiddUser.Mobile.Trim();
            UserModel.ContactInfo.Tel         = MiddUser.Telephone.Trim();
            UserModel.ContactInfo.Fax         = MiddUser.Fax.Trim();
            UserModel.ContactInfo.Email       = MiddUser.Email.Trim();
            UserModel.ContactInfo.MSN         = MiddUser.MSN.Trim();
            UserModel.ContactInfo.QQ          = MiddUser.QQ.Trim();

            try
            {
                responseInfo.IsSuccess = UserBll.UpdateChild(UserModel);
                responseInfo.Desc      = "修改用户信息操作已完成!";
            }
            catch (Exception e)
            {
                responseInfo.IsSuccess = false;
                responseInfo.Desc      = "修改用户操作执行异常!";
                responseInfo.ErrorCode = e.Message + e.StackTrace;
            }

            return(responseInfo);
        }
Ejemplo n.º 10
0
        /// <summary>
        /// 新增用户信息
        /// </summary>
        /// <param name="requestInfo"></param>
        /// <returns></returns>
        private EyouSoft.OpenRelation.Model.MResponseInfo CreateUserInfo(EyouSoft.OpenRelation.Model.MRequestInfo requestInfo)
        {
            EyouSoft.OpenRelation.Model.MResponseInfo responseInfo = new EyouSoft.OpenRelation.Model.MResponseInfo()
            {
                IsSuccess = true
            };
            if (requestInfo == null)
            {
                responseInfo.IsSuccess = false;
                responseInfo.Desc      = "http request post info对象为空!";

                return(responseInfo);
            }
            EyouSoft.OpenRelation.Model.MUserInfo MiddUser = EyouSoft.OpenRelation.Utils.InvertJSON <EyouSoft.OpenRelation.Model.MUserInfo>(requestInfo.InstructionCode);
            if (MiddUser == null)
            {
                responseInfo.IsSuccess = false;
                responseInfo.Desc      = "Josn对象转为中间平台对象时发生错误!";

                return(responseInfo);
            }

            //大平台邮箱不能为空 赋值空格
            if (string.IsNullOrEmpty(MiddUser.Email))
            {
                MiddUser.Email = " ";
            }

            int provinceId, cityId;

            this.GetProvinceAndCityId(MiddUser.ProvinceName, MiddUser.CityName, out provinceId, out cityId);

            EyouSoft.Model.CompanyStructure.CompanyUser UserModel = new EyouSoft.Model.CompanyStructure.CompanyUser();
            EyouSoft.IBLL.CompanyStructure.ICompanyUser UserBll   = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance();
            UserModel.PassWordInfo = new EyouSoft.Model.CompanyStructure.PassWord();
            UserModel.ContactInfo  = new EyouSoft.Model.CompanyStructure.ContactPersonInfo();
            UserModel.UserName     = MiddUser.UserName.Trim();
            UserModel.PassWordInfo.NoEncryptPassword = MiddUser.Password.Trim();
            UserModel.ContactInfo.ContactName        = MiddUser.RealName.Trim();
            UserModel.ContactInfo.ContactSex         = GetGender(MiddUser.Gender);
            UserModel.ContactInfo.Mobile             = MiddUser.Mobile.Trim();
            UserModel.ContactInfo.Tel   = MiddUser.Telephone.Trim();
            UserModel.ContactInfo.Fax   = MiddUser.Fax.Trim();
            UserModel.ContactInfo.Email = MiddUser.Email.Trim();
            UserModel.ContactInfo.MSN   = MiddUser.MSN.Trim();
            UserModel.ContactInfo.QQ    = MiddUser.QQ.Trim();

            UserModel.OpUserId   = MiddUser.SystemUserId;
            UserModel.IsAdmin    = false;
            UserModel.IsEnable   = true;
            UserModel.CompanyID  = MiddUser.PlatformCompanyId;
            UserModel.DepartId   = string.Empty;
            UserModel.DepartName = string.Empty;
            UserModel.RoleID     = string.Empty;
            UserModel.ProvinceId = provinceId;
            UserModel.CityId     = cityId;

            try
            {
                responseInfo.IsSuccess = UserBll.Add(UserModel) == EyouSoft.Model.ResultStructure.ResultInfo.Succeed ? true : false;
                responseInfo.Desc      = "新增用户操作执行完成!";

                if (responseInfo.IsSuccess)
                {
                    EyouSoft.OpenRelation.Model.MRCreateUserInfo rInfo = new EyouSoft.OpenRelation.Model.MRCreateUserInfo()
                    {
                        PlatformCompanyId = UserModel.CompanyID,
                        PlatformUserId    = UserModel.ID
                    };
                    responseInfo.InstructionCode = EyouSoft.OpenRelation.Utils.ConvertJSON <EyouSoft.OpenRelation.Model.MRCreateUserInfo>(rInfo);
                    responseInfo.Desc            = "新增用户操作执行完成!";
                }
                else
                {
                    responseInfo.Desc = "创建用户失败,业务逻辑层返回失败信息!";
                }
            }
            catch (Exception e)
            {
                responseInfo.IsSuccess = false;
                responseInfo.Desc      = "新增用户操作执行异常!";
                responseInfo.ErrorCode = e.Message + e.StackTrace;
            }

            return(responseInfo);
        }