Beispiel #1
0
 protected override void OnPreInit(EventArgs e)
 {
     base.OnPreInit(e);
     imageServerUrl = ImageManage.GetImagerServerUrl(1);
     isLogin        = EyouSoft.Security.Membership.UserProvider.IsUserLogin();
     Model.CompanyStructure.CompanyUser user = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance().GetModel("50caa9ca-f15c-440e-8d91-8d160de3c382");
     _userInfo = new UserInfo()
     {
         CityId      = 1,
         CompanyID   = "1e5edc20-4b83-4c16-8c52-008e0c09bd1e",
         UserName    = user.UserName,
         ContactInfo = user.ContactInfo,
         DepartId    = "1",
         ProvinceId  = 1,
         DepartName  = "432fds",
         IsAdmin     = true,
         ID          = "50caa9ca-f15c-440e-8d91-8d160de3c382",
     };
     Model.CompanyStructure.CompanyRole r = new EyouSoft.Model.CompanyStructure.CompanyRole();
     r.SetRole(EyouSoft.Model.CompanyStructure.CompanyType.专线);
     r.SetRole(EyouSoft.Model.CompanyStructure.CompanyType.组团);
     _userInfo.CompanyRole = r;
     _userInfo.AreaId      = new int[3] {
         1, 2, 3
     };
     //string[] arr = user.AreaList.Split(',');
     //for (int i = 0; i < arr.Length; i++)
     //{
     //    _userInfo.AreaId[i] = Int32.Parse(arr[i]);
     //}
 }
Beispiel #2
0
        public EyouSoft.Model.ResultStructure.UserResultInfo CreatCompany(string CompanyName,
                                                                          EyouSoft.Model.CompanyStructure.CompanyType[] CompanyTypes, string License, string CompanyBrand, int ProvinceId, int CityId,
                                                                          string AdminUser, string AdminPWD, string AdminName, string AdminTel, string AdminMobile, string Email)
        {
            if (!soapHeader.IsSafeCall)
            {
                throw new Exception("对不起,您没有权限调用此服务!");
            }

            EyouSoft.Model.ResultStructure.UserResultInfo      Result = new EyouSoft.Model.ResultStructure.UserResultInfo();
            EyouSoft.Model.CompanyStructure.CompanyArchiveInfo model  = new EyouSoft.Model.CompanyStructure.CompanyArchiveInfo();

            /*公司信息*/
            model.CompanyName  = Utils.InputText(CompanyName);
            model.ProvinceId   = ProvinceId;
            model.CityId       = CityId;
            model.CompanyBrand = Utils.InputText(CompanyBrand);
            model.License      = Utils.InputText(License);


            /*用户信息*/
            EyouSoft.Model.CompanyStructure.UserAccount UserModel = new EyouSoft.Model.CompanyStructure.UserAccount();
            UserModel.UserName = Utils.InputText(AdminUser);
            UserModel.PassWordInfo.NoEncryptPassword = Utils.InputText(AdminPWD);
            model.AdminAccount = UserModel;

            /* 公司联系人信息 */
            EyouSoft.Model.CompanyStructure.ContactPersonInfo ContactModel = new EyouSoft.Model.CompanyStructure.ContactPersonInfo();
            ContactModel.ContactName = Utils.InputText(AdminName);
            ContactModel.Tel         = Utils.InputText(AdminTel);
            ContactModel.Mobile      = Utils.InputText(AdminMobile);
            ContactModel.Email       = Utils.InputText(Email);
            model.ContactInfo        = ContactModel;

            /* 公司身份 */
            EyouSoft.Model.CompanyStructure.CompanyRole RoleMode = new EyouSoft.Model.CompanyStructure.CompanyRole();
            if (CompanyTypes != null && CompanyTypes.Length > 0)
            {
                foreach (EyouSoft.Model.CompanyStructure.CompanyType tmp in CompanyTypes)
                {
                    RoleMode.SetRole(tmp);
                }
            }
            model.CompanyRole = RoleMode;

            Result       = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().Add(model, string.Empty);
            model        = null;
            UserModel    = null;
            ContactModel = null;
            RoleMode     = null;

            return(Result);
        }
Beispiel #3
0
 private void InitCompanyInfo()
 {
     compDetail = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(CompanyId); //公司详细信息
     if (compDetail != null)
     {
         ltr_BrandName.Text   = compDetail.CompanyBrand;
         ltr_CompanyName.Text = compDetail.CompanyName;
         ltr_Address.Text     = compDetail.CompanyAddress;
         ltr_LinkPerson.Text  = compDetail.ContactInfo.ContactName;
         ltr_Faxs.Text        = compDetail.ContactInfo.Fax;
         ltr_Mobel.Text       = compDetail.ContactInfo.Mobile;
         ltr_Phone.Text       = compDetail.ContactInfo.Tel;
         if (compDetail.SaleCity != null && compDetail.SaleCity.Count > 0)
         {
             string SaleCity = string.Empty;
             for (int i = 0; i < compDetail.SaleCity.Count; i++)
             {
                 SaleCity += compDetail.SaleCity[i].CityName + " ";
             }
             ltr_SaleArea.Text = SaleCity;
         }
         //公司类型
         EyouSoft.Model.CompanyStructure.CompanyRole roleModel = compDetail.CompanyRole;
         if (roleModel != null)
         {
             StringBuilder strRoleName = new StringBuilder();
             if (roleModel.RoleItems.Length > 0)
             {
                 for (int i = 0; i < roleModel.RoleItems.Length; i++)
                 {
                     strRoleName.Append(roleModel.RoleItems[i].ToString() + " ");
                 }
             }
             ltr_CompanyType.Text = strRoleName.ToString();
         }
         //mq地址
         if (!string.IsNullOrEmpty(compDetail.ContactInfo.MQ))
         {
             MqPath = Utils.GetBigImgMQ(compDetail.ContactInfo.MQ);
         }
         ImagePath = Utils.GetLineShopImgPath(compDetail.AttachInfo.CompanyImg.ImagePath, 6);
         //Logo 地址
         LogoPath = string.Format("<img src=\"{0}\" width=\"140\" height=\"62\" style=\"border:1px solid #E9E9E9;\"/>", Utils.GetLineShopImgPath(compDetail.AttachInfo.CompanyLogo.ImagePath, 2)); //LogoPath
     }
 }
Beispiel #4
0
        /// <summary>
        /// 注册新用户
        /// </summary>
        protected int RegisterCompany(string companyId)
        {
            int AddisTrue = 0;

            if (EyouSoft.Cache.Facade.EyouSoftCache.GetCache("REG_" + Request.UserHostAddress) != null)
            {
                AddisTrue = 5; //注册太频繁
                return(AddisTrue);
            }



            string CompanyName   = Utils.InputText(Request.Form["txtCompanyName"]);   //公司名
            string UserName      = Utils.InputText(Request.Form["txtUserName"]);      //用户名
            string PassWord      = Utils.InputText(Request.Form["txtFristPassWord"]); //密码
            string LicenseNumber = Utils.InputText(Request.Form["txtLicenseNumber"]); //许可证号
            string BrandName     = Utils.InputText(Request.Form["txtBrandName"]);     //品牌名称
            //int ProvinceId = 0;//省份
            //if (Request.Form["ctl00$Main$ProvinceAndCityList1$ddl_ProvinceList"] != null)
            //    ProvinceId = Convert.ToInt32(Request.Form["ctl00$Main$ProvinceAndCityList1$ddl_ProvinceList"]);
            //else if (Request.Form["ProvinceAndCityList1$ddl_ProvinceList"] != null)
            //    ProvinceId = Convert.ToInt32(Request.Form["ProvinceAndCityList1$ddl_ProvinceList"]);

            //int CityId = 0;//城市
            //if (Request.Form["ctl00$Main$ProvinceAndCityList1$ddl_CityList"] != null)
            //    CityId = Convert.ToInt32(Request.Form["ctl00$Main$ProvinceAndCityList1$ddl_CityList"]);
            //else if (Request.Form["ProvinceAndCityList1$ddl_CityList"] != null)
            //    CityId = Convert.ToInt32(Request.Form["ProvinceAndCityList1$ddl_CityList"]); //城市

            //int CountyId = 0;//地区(县)
            //if (Request.Form["ctl00$Main$ProvinceAndCityList1$ddl_CountyList"] != null)
            //    CountyId = Convert.ToInt32(Request.Form["ctl00$Main$ProvinceAndCityList1$ddl_CountyList"]);
            //else if (Request.Form["ProvinceAndCityList1$ddl_CityList"] != null)
            //    CountyId = Convert.ToInt32(Request.Form["ProvinceAndCityList1$ddl_CountyList"]); //城市
            int ProvinceId = 0;//省份

            if (Utils.GetFormValue(ddl_ProvinceList.UniqueID) != null)
            {
                ProvinceId = Convert.ToInt32(Utils.GetFormValue(ddl_ProvinceList.UniqueID));
            }

            int CityId = 0;//城市

            if (Utils.GetFormValue(ddl_CityList.UniqueID) != null)
            {
                CityId = Convert.ToInt32(Utils.GetFormValue(ddl_CityList.UniqueID));
            }
            int CountyId = 0;//地区(县)

            if (Utils.GetFormValue(ddl_CountyList.UniqueID) != null)
            {
                CountyId = Convert.ToInt32(Utils.GetFormValue(ddl_CountyList.UniqueID));
            }
            string OfficeAddress = Utils.InputText(Request.Form["txtOfficeAddress"]);       //办公地点
            //string CommendCompany = Utils.InputText(Request.Form["txtCommendCompany"]); 引荐单位
            string CompanyType       = Utils.InputText(Request.QueryString["companytype"]); //公司类型
            string ContactName       = Utils.InputText(Request.Form["txtContactName"]);
            string ContactTel        = Utils.InputText(Request.Form["txtContactTel"]);
            string ContactMobile     = Utils.InputText(Request.Form["txtContactMobile"]);
            string ContactFax        = Utils.InputText(Request.Form["txtContactFax"]);
            string ContactEmail      = Utils.InputText(Request.Form["txtContactEmail"]);
            string ContactQQ         = Utils.GetFormValue("qq", 100); //QQ,注意可能多个用半角逗号分割的
            string ContactMSN        = Utils.InputText(Request.Form["txtMsn"]);
            string CompanyInfo       = Utils.InputText(Request.Form["txtCompanyInfo"]);
            string CompanyMainpro    = Utils.InputText(Request.Form["txtMainProduct"]);
            string CompanySimpleName = Utils.InputText(Request.Form["txtCompanySimpleName"]);

            /*公司信息*/
            EyouSoft.Model.CompanyStructure.CompanyArchiveInfo model = new EyouSoft.Model.CompanyStructure.CompanyArchiveInfo();
            /*用户信息*/
            EyouSoft.Model.CompanyStructure.UserAccount UserModel = new EyouSoft.Model.CompanyStructure.UserAccount();
            /* 公司联系人信息 */
            EyouSoft.Model.CompanyStructure.ContactPersonInfo ContactModel = new EyouSoft.Model.CompanyStructure.ContactPersonInfo();
            string OtherSaleCity = "";

            if (string.IsNullOrEmpty(CompanyType))
            {
                AddisTrue = 0;
            }
            else
            {
                if (string.IsNullOrEmpty(companyId)) //随便逛逛申请,修改
                {
                    UserModel.UserName = UserName;   /*用户信息*/
                }
                UserModel.PassWordInfo.NoEncryptPassword = PassWord;
                ContactModel.ContactName = ContactName;
                ContactModel.Mobile      = ContactMobile;
                ContactModel.Email       = ContactEmail;
                ContactModel.QQ          = ContactQQ;
                ContactModel.Fax         = ContactFax;
                ContactModel.MSN         = ContactMSN;
                ContactModel.Tel         = ContactTel;
                if (CompanyType != "-1")  //游客
                {
                    #region 非随便看看用户
                    /*公司信息*/
                    model.CompanyName    = CompanyName;
                    model.ProvinceId     = ProvinceId;
                    model.CityId         = CityId;
                    model.CountyId       = CountyId;
                    model.CompanyAddress = OfficeAddress;
                    model.CompanyBrand   = BrandName;
                    model.License        = LicenseNumber;
                    model.Introduction   = CompanySimpleName;
                    model.Remark         = CompanyInfo;
                    model.Scale          = (EyouSoft.Model.CompanyStructure.CompanyScale)Utils.GetInt(this.sltCompanySize.Value);
                    model.ProvinceId     = Utils.GetInt(Utils.GetFormValue(this.ddl_ProvinceList.UniqueID));
                    model.CityId         = Utils.GetInt(Utils.GetFormValue(this.ddl_CityList.UniqueID));
                    model.CountyId       = Utils.GetInt(Utils.GetFormValue(this.ddl_CountyList.UniqueID));
                    model.CompanyBrand   = BrandName;
                    //model.Qualification
                    //model.AdminAccount = UserModel;

                    ContactModel.Tel = ContactTel;
                    ContactModel.Fax = ContactFax;
                    //model.ContactInfo = ContactModel;
                    // model.CommendPeople = CommendCompany;
                    //旅行社资质
                    string[] lxszz = Utils.Split(Utils.GetFormValue("chxzz"), ",");
                    if (lxszz != null && lxszz.Length > 0)
                    {
                        List <EyouSoft.Model.CompanyStructure.CompanyQualification> zizi = new List <EyouSoft.Model.CompanyStructure.CompanyQualification>();
                        for (int i = 0; i < lxszz.Length; i++)
                        {
                            if (lxszz[i] == "1")
                            {
                                zizi.Add(EyouSoft.Model.CompanyStructure.CompanyQualification.出境旅游);
                            }
                            if (lxszz[i] == "2")
                            {
                                zizi.Add(EyouSoft.Model.CompanyStructure.CompanyQualification.入境旅游);
                            }
                            if (lxszz[i] == "3")
                            {
                                zizi.Add(EyouSoft.Model.CompanyStructure.CompanyQualification.台湾旅游);
                            }
                        }
                        model.Qualification = zizi;
                    }
                    /* 公司身份 */
                    EyouSoft.Model.CompanyStructure.CompanyRole RoleMode = new EyouSoft.Model.CompanyStructure.CompanyRole();
                    EyouSoft.Model.CompanyStructure.CompanyType TypeEmnu = EyouSoft.Model.CompanyStructure.CompanyType.全部;

                    if (CompanyType == "0") //线路供应商(专线,地接)
                    {
                        string[] strType = Utils.Split(Utils.GetFormValue("hdfZXandDj"), ",");
                        for (int i = 0; i < strType.Length; i++)
                        {
                            //设置经营线路区域
                            string[] strAreaList = Utils.Split(Utils.GetFormValue("checkbox_Area"), ",");
                            if (strAreaList != null)
                            {
                                List <EyouSoft.Model.SystemStructure.AreaBase> AreaList = new List <EyouSoft.Model.SystemStructure.AreaBase>();
                                for (int j = 0; j < strAreaList.Length; j++)
                                {
                                    EyouSoft.Model.SystemStructure.AreaBase item = new EyouSoft.Model.SystemStructure.AreaBase();
                                    item.AreaId = Convert.ToInt32(strAreaList[j]);
                                    AreaList.Add(item);
                                    item = null;
                                }
                                model.Area = AreaList;
                                AreaList   = null;
                            }
                            if (strType[i] == "1")
                            {
                                TypeEmnu = EyouSoft.Model.CompanyStructure.CompanyType.专线;
                                string[] strSalelist = Request.Form.GetValues("ckSellCity");
                                if (strSalelist != null)
                                {
                                    //设置销售城市
                                    List <EyouSoft.Model.SystemStructure.CityBase> SaleCity = new List <EyouSoft.Model.SystemStructure.CityBase>();
                                    for (int j = 0; j < strSalelist.Length; j++)
                                    {
                                        EyouSoft.Model.SystemStructure.CityBase item = new EyouSoft.Model.SystemStructure.CityBase();
                                        item.CityId = Convert.ToInt32(strSalelist[j]);
                                        SaleCity.Add(item);
                                        item = null;
                                    }
                                    model.SaleCity = SaleCity;
                                    SaleCity       = null;
                                }
                                OtherSaleCity = Utils.InputText(Request.Form["inputOtherSaleCity"]);
                            }
                            if (strType[i] == "3")
                            {
                                TypeEmnu = EyouSoft.Model.CompanyStructure.CompanyType.地接;
                            }
                            RoleMode.SetRole(TypeEmnu);
                            model.CompanyRole = RoleMode;
                        }
                    }
                    else
                    {
                        switch (CompanyType)
                        {
                        case "2":
                            TypeEmnu = EyouSoft.Model.CompanyStructure.CompanyType.组团;
                            break;

                        case "4":
                            TypeEmnu = EyouSoft.Model.CompanyStructure.CompanyType.景区;
                            break;

                        case "5":
                            TypeEmnu = EyouSoft.Model.CompanyStructure.CompanyType.酒店;
                            break;

                        case "6":
                            TypeEmnu = EyouSoft.Model.CompanyStructure.CompanyType.车队;
                            break;

                        case "7":
                            TypeEmnu = EyouSoft.Model.CompanyStructure.CompanyType.旅游用品店;
                            break;

                        case "8":
                            TypeEmnu = EyouSoft.Model.CompanyStructure.CompanyType.购物店;
                            break;

                        case "9":
                            TypeEmnu = EyouSoft.Model.CompanyStructure.CompanyType.机票供应商;
                            //机票
                            ContactModel.QQ  = Utils.InputText(Request.Form["txtContactQQ"]);
                            ContactModel.MSN = Utils.InputText(Request.Form["txtContactMSN"]);
                            EyouSoft.Model.TicketStructure.TicketWholesalersInfo ticketinfo = new EyouSoft.Model.TicketStructure.TicketWholesalersInfo();
                            ticketinfo.ProxyLev      = Utils.InputText(Request.Form["txtDlNumber"]);
                            ticketinfo.WorkStartTime = Utils.InputText(Request.Form["WorkStartTime"]);     //上下班时间
                            ticketinfo.WorkEndTime   = Utils.InputText(Request.Form["WorkEndTime"]);
                            ticketinfo.OfficeNumber  = Utils.InputText(Request.Form["txtOffice"]);
                            if (!string.IsNullOrEmpty(companyId))     //随便逛逛申请,修改
                            {
                                ticketinfo.CompanyId = companyId;
                            }
                            model.TicketSupplierInfo = ticketinfo;
                            // model.License
                            break;

                        case "10":
                            TypeEmnu = EyouSoft.Model.CompanyStructure.CompanyType.其他采购商;
                            break;

                        case "11":
                            TypeEmnu = EyouSoft.Model.CompanyStructure.CompanyType.随便逛逛;
                            break;
                        }
                        RoleMode.SetRole(TypeEmnu);
                        model.CompanyRole = RoleMode;
                    }
                    #endregion
                }
                model.AdminAccount = UserModel;
                model.ContactInfo  = ContactModel;
                if (!string.IsNullOrEmpty(companyId)) //随便逛逛申请,修改
                {
                    model.ID  = companyId;
                    AddisTrue = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().ToCompany(model, OtherSaleCity) == true ? 1 : 0;
                }
                else    //注册添加
                {
                    EyouSoft.Model.ResultStructure.UserResultInfo Result = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().Add(model, OtherSaleCity);
                    switch (Result)
                    {
                    case EyouSoft.Model.ResultStructure.UserResultInfo.Succeed:
                        AddisTrue = 1;
                        EyouSoft.Cache.Facade.EyouSoftCache.Add("REG_" + Request.UserHostAddress, DateTime.Now, DateTime.Now.AddMinutes(5));
                        break;

                    case EyouSoft.Model.ResultStructure.UserResultInfo.ExistsEmail:
                        AddisTrue = 2;
                        break;

                    case EyouSoft.Model.ResultStructure.UserResultInfo.ExistsUserName:
                        AddisTrue = 3;
                        break;

                    case EyouSoft.Model.ResultStructure.UserResultInfo.Error:
                        AddisTrue = 0;
                        break;
                    }
                }
            }
            return(AddisTrue);
        }
Beispiel #5
0
        /// <summary>
        /// 新增公司信息
        /// </summary>
        /// <param name="requestInfo"></param>
        /// <returns></returns>
        private EyouSoft.OpenRelation.Model.MResponseInfo CreateCompanyInfo(EyouSoft.OpenRelation.Model.MRequestInfo requestInfo)
        {
            EyouSoft.OpenRelation.Model.MResponseInfo responseInfo = new EyouSoft.OpenRelation.Model.MResponseInfo()
            {
                IsSuccess = true
            };

            EyouSoft.OpenRelation.Model.MCUInfo middleInfo = EyouSoft.OpenRelation.Utils.InvertJSON <EyouSoft.OpenRelation.Model.MCUInfo>(requestInfo.InstructionCode);
            EyouSoft.Model.CompanyStructure.CompanyArchiveInfo companyInfo = new EyouSoft.Model.CompanyStructure.CompanyArchiveInfo();
            EyouSoft.Model.CompanyStructure.UserAccount        userInfo    = new EyouSoft.Model.CompanyStructure.UserAccount();
            EyouSoft.Model.CompanyStructure.ContactPersonInfo  contactInfo = new EyouSoft.Model.CompanyStructure.ContactPersonInfo();
            EyouSoft.Model.CompanyStructure.CompanyRole        roleInfo    = new EyouSoft.Model.CompanyStructure.CompanyRole();

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

            int provinceId, cityId;

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

            companyInfo.CompanyName    = middleInfo.CompanyInfo.CompanyName;
            companyInfo.CompanyAddress = middleInfo.CompanyInfo.Address;
            companyInfo.ProvinceId     = provinceId;
            companyInfo.CityId         = cityId;

            userInfo.UserName     = middleInfo.UserInfo.UserName;
            userInfo.PassWordInfo = new EyouSoft.Model.CompanyStructure.PassWord(middleInfo.UserInfo.Password);

            contactInfo.ContactName = middleInfo.CompanyInfo.ContactName;
            contactInfo.Email       = middleInfo.CompanyInfo.ContactEmail;
            contactInfo.Fax         = middleInfo.CompanyInfo.ContactFax;
            contactInfo.Mobile      = middleInfo.CompanyInfo.ContactMobile;
            contactInfo.MSN         = middleInfo.CompanyInfo.ContactMSN;
            contactInfo.QQ          = middleInfo.CompanyInfo.ContactQQ;
            contactInfo.Tel         = middleInfo.CompanyInfo.ContactTelephone;
            contactInfo.ContactSex  = GetGender(middleInfo.CompanyInfo.ContactGender);

            if (middleInfo.CompanyInfo.PlatformCompanyType == EyouSoft.OpenRelation.Model.PlatformCompanyType.ZT)
            {
                roleInfo.SetRole(EyouSoft.Model.CompanyStructure.CompanyType.组团);
            }
            else if (middleInfo.CompanyInfo.PlatformCompanyType == EyouSoft.OpenRelation.Model.PlatformCompanyType.ZX)
            {
                roleInfo.SetRole(EyouSoft.Model.CompanyStructure.CompanyType.专线);
            }

            companyInfo.AdminAccount = userInfo;
            companyInfo.CompanyRole  = roleInfo;
            companyInfo.ContactInfo  = contactInfo;

            try
            {
                EyouSoft.Model.ResultStructure.UserResultInfo resultInfo = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().Add(companyInfo, string.Empty);
                if (resultInfo == EyouSoft.Model.ResultStructure.UserResultInfo.Succeed)
                {
                    responseInfo.IsSuccess = true;
                    responseInfo.Desc      = "创建公司成功!";
                    EyouSoft.OpenRelation.Model.MRCreateUserInfo rInfo = new EyouSoft.OpenRelation.Model.MRCreateUserInfo()
                    {
                        PlatformCompanyId = companyInfo.ID,
                        PlatformUserId    = companyInfo.AdminAccount.ID
                    };
                    responseInfo.InstructionCode = EyouSoft.OpenRelation.Utils.ConvertJSON <EyouSoft.OpenRelation.Model.MRCreateUserInfo>(rInfo);

                    EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().PassRegister(companyInfo.ID);
                }
                else
                {
                    responseInfo.IsSuccess = false;
                    responseInfo.Desc      = "创建公司失败,业务逻辑层返回失败信息!";
                }
            }
            catch (Exception e)
            {
                responseInfo.IsSuccess = false;
                responseInfo.Desc      = "创建公司失败,捕获到异常!";
                responseInfo.ErrorCode = e.Message + e.StackTrace;
            }

            return(responseInfo);
        }
Beispiel #6
0
        /// <summary>
        /// 初始化基础信息
        /// </summary>
        private void InitBasicInfo()
        {
            if (UserInfoModel != null)
            {
                EyouSoft.Model.CompanyStructure.CompanyInfo comModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(UserInfoModel.CompanyID);
                if (comModel != null)
                {
                    this.lblLoginUser.Text = "您好," + UserInfoModel.UserName + Utils.GetCompanyLevImg(comModel.CompanyLev) + " 欢迎登录同业114。信息完整度:<a class=\"ff0000\" href='javascript:void(0);' onclick='topTab.open(\"/systemset/companyinfoset.aspx\",\"单位信息\");return false;' >" + (comModel.InfoFull * 100).ToString("00") + "%</a>";
                }
                else
                {
                    this.lblLoginUser.Text = "您好," + UserInfoModel.UserName + " 欢迎登录同业114。";
                }
            }
            EyouSoft.IBLL.CompanyStructure.ICompanySetting CSetBll   = EyouSoft.BLL.CompanyStructure.CompanySetting.CreateInstance();
            EyouSoft.Model.CompanyStructure.CompanySetting CSetModel = CSetBll.GetModel(UserInfoModel.CompanyID);
            if (CSetModel != null)
            {
                switch (CSetModel.FirstMenu)
                {
                case EyouSoft.Model.CompanyStructure.MenuSection.专线服务:
                    FirstMenu = "0";
                    break;

                case EyouSoft.Model.CompanyStructure.MenuSection.组团服务:
                    FirstMenu = "1";
                    break;

                case EyouSoft.Model.CompanyStructure.MenuSection.地接服务:
                    FirstMenu = "2";
                    break;

                case EyouSoft.Model.CompanyStructure.MenuSection.景区服务:
                    FirstMenu = "3";
                    break;

                default:
                    FirstMenu = "1";
                    break;
                }
            }

            #region 公告区
            EyouSoft.IBLL.SystemStructure.ISummaryCount SummaryBll   = EyouSoft.BLL.SystemStructure.SummaryCount.CreateInstance();
            EyouSoft.Model.SystemStructure.SummaryCount SummaryModel = SummaryBll.GetSummary();
            if (SummaryModel != null)
            {
                this.lblRouteAgencyCount.Text = (SummaryModel.TravelAgency + SummaryModel.TravelAgencyVirtual).ToString();
                this.lblHotelCount.Text       = (SummaryModel.Hotel + SummaryModel.HotelVirtual).ToString();
                this.lblSightCount.Text       = (SummaryModel.Sight + SummaryModel.SightVirtual).ToString();
                this.lblCarCount.Text         = (SummaryModel.Car + SummaryModel.CarVirtual).ToString();
                this.lblShoppingCount.Text    = (SummaryModel.Shop + SummaryModel.ShopVirtual).ToString();
            }
            SummaryModel = null;
            SummaryBll   = null;
            #endregion

            #region  业114提醒
            EyouSoft.Model.CompanyStructure.CompanyRole   RoleModel = UserInfoModel.CompanyRole;
            EyouSoft.Model.CompanyStructure.CompanyType[] enumType  = RoleModel.RoleItems;

            #region 专线和组团显示控制
            if (enumType != null && enumType.Length > 0)
            {
                foreach (EyouSoft.Model.CompanyStructure.CompanyType type in enumType)
                {
                    if (type == EyouSoft.Model.CompanyStructure.CompanyType.专线)
                    {
                        IsRouteAgency = true;
                    }
                    else if (type == EyouSoft.Model.CompanyStructure.CompanyType.组团 || type == EyouSoft.Model.CompanyStructure.CompanyType.其他采购商)
                    {
                        IsTourAgency = true;
                    }
                    else if (type == EyouSoft.Model.CompanyStructure.CompanyType.地接)
                    {
                        IsLocalAgency = true;
                    }
                    else if (type == EyouSoft.Model.CompanyStructure.CompanyType.景区)
                    {
                        IsSightAgency = true;
                    }
                    else
                    {
                        IsOther = true;
                    }
                }

                if (IsRouteAgency)   // 仅为专线
                {
                    this.span_RouteAgency.Visible = true;
                    this.ul_RouteAgency.Visible   = true;
                }
                if (IsTourAgency)     // 仅为组团
                {
                    this.span_TourAgency.Visible = true;
                    this.ul_TourAgency.Visible   = true;
                }
                if (IsLocalAgency)   //仅为地接
                {
                    this.span_ErAgency.Visible = true;
                    this.ul_ErAgency.Visible   = true;
                }
                if (IsSightAgency) //景区
                {
                    this.span_Scenic.Visible = true;
                    this.ul_Scenic.Visible   = true;
                }
                //if (IsOther)
                //{
                //    Utils.ShowError("对不起,您不是旅行社账户!", "");

                //    this.span_RouteAgency.Visible = false;
                //    this.ul_RouteAgency.Visible = false;
                //    this.span_TourAgency.Visible = false;
                //    this.ul_TourAgency.Visible = false;
                //    this.span_ErAgency.Visible = false;
                //    this.ul_ErAgency.Visible = false;
                //    this.span_Scenic.Visible = true;
                //    this.ul_Scenic.Visible = true;
                //    divNoLocalAgency.Visible = false;
                //}
            }
            #endregion

            EyouSoft.IBLL.TourStructure.ITour          TourBll   = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            EyouSoft.IBLL.NewTourStructure.ITourList   iorderBll = EyouSoft.BLL.NewTourStructure.BTourList.CreateInstance();
            EyouSoft.IBLL.NewTourStructure.IPowderList powderBll = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance();
            EyouSoft.IBLL.NewTourStructure.IRoute      routeBll  = EyouSoft.BLL.NewTourStructure.BRoute.CreateInstance();
            Dictionary <string, int> dic = null;
            #region 组团提醒
            if (IsTourAgency)     // 组团提醒
            {
                //获得线路数和团队数
                EyouSoft.IBLL.SystemStructure.ISysCity CityBll   = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance();
                EyouSoft.Model.SystemStructure.SysCity CityModel = CityBll.GetSysCityModel(UserInfoModel.CityId);
                if (CityModel != null)
                {
                    this.lblCity.Text = CityModel.CityName;
                    this.lblTemplateTourCount.Text = CityModel.ParentTourCount.ToString();
                    this.lblChildTourCount.Text    = CityModel.TourCount.ToString();
                }
                CityModel = null;
                CityBll   = null;

                //获得组团订单信息
                dic = iorderBll.GetOrderTravelCount(UserInfoModel.CompanyID);
                if (dic != null)
                {
                    if (dic.ContainsKey("未发团散客预订单") && dic.ContainsKey("散客订单未处理") && dic.ContainsKey("散客订单预留待付款") && dic.ContainsKey("散客订单已确认"))
                    {
                        this.lblTourOrderFrist.Text = string.Format(
                            " 未发团散客预订单:<a class=\"ff0000\" href=\"/teamservice/fitorders.aspx?goTimeS={0}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>",
                            DateTime.Now.ToShortDateString()) + dic["未发团散客预订单"].ToString() + "单</b></a>,";
                        this.lblTourOrderFrist.Text +=
                            string.Format(
                                "其中未处理<a class=\"ff0000\" href=\"/teamservice/fitorders.aspx?goTimeS={3}&status={0},{1},{2}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>",
                                (int)EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社待处理,
                                (int)EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社已阅,
                                (int)EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商待处理,
                                DateTime.Now.ToShortDateString()) +
                            dic["散客订单未处理"].ToString() + "单</b></a>,";
                        this.lblTourOrderFrist.Text += string.Format(
                            "预留待付款<a class=\"ff0000\" href=\"/teamservice/fitorders.aspx?goTimeS={0}&status={1}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>",
                            DateTime.Now.ToShortDateString(),
                            (int)EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商预留)
                                                       + dic["散客订单预留待付款"].ToString() + "单</b></a>,";
                        this.lblTourOrderFrist.Text +=
                            string.Format(
                                "已确认<a href=\"/teamservice/fitorders.aspx?goTimeS={0}&status={1},{2}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>",
                                DateTime.Now.ToShortDateString(),
                                (int)EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商已确定,
                                (int)EyouSoft.Model.NewTourStructure.PowderOrderStatus.结单) +
                            dic["散客订单已确认"].ToString() + "单</b></a>";
                    }

                    if (dic.ContainsKey("未发团团队预订单") && dic.ContainsKey("团队未确认") && dic.ContainsKey("团队已确认"))
                    {
                        this.lblTourOrderSecond.Text = string.Format(
                            "未发团团队预订单:<a class=\"ff0000\" href=\"/teamservice/teamorders.aspx?ref=0&goTimeS={0}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>",
                            DateTime.Now.ToShortDateString()) + dic["未发团团队预订单"].ToString() + "单</b></a>,";
                        this.lblTourOrderSecond.Text +=
                            string.Format(
                                "未确认订单<a class=\"ff0000\" href=\"/teamservice/teamorders.aspx?ref=0&goTimeS={1}&status={0}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>",
                                (int)EyouSoft.Model.NewTourStructure.TourOrderStatus.未确认,
                                DateTime.Now.ToShortDateString()) +
                            dic["团队未确认"].ToString() + "单</b></a>,";
                        this.lblTourOrderSecond.Text +=
                            string.Format(
                                "已确认<a href=\"/teamservice/teamorders.aspx?ref=0&goTimeS={2}&status={0},{1}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>",
                                (int)EyouSoft.Model.NewTourStructure.TourOrderStatus.已确认,
                                (int)EyouSoft.Model.NewTourStructure.TourOrderStatus.结单,
                                DateTime.Now.ToShortDateString()) +
                            dic["团队已确认"].ToString() + "单</b></a>";
                    }
                }
            }
            #endregion

            #region 专线提醒
            if (IsRouteAgency)
            {
                int ComingLeaveTourNumber = TourBll.GetComingExpireTourNumber();
                if (ComingLeaveTourNumber > 0)
                {
                    this.lblComingExpireToursCount.Text = "<img src='" + ImageServerPath + "/images/gantanhao.gif' />您当前共有<a href='/routeagency/notstartingteams.aspx' onclick=\"topTab.open($(this).attr('href'),'未出发团队');return false;\">" + ComingLeaveTourNumber + "个团</a>将于1周后到期,请及时更新计划,以方便组团社查询";
                }
                //获得专线下线路区域和团的数量

                IList <EyouSoft.Model.TourStructure.AreaStatInfo> TourByAreaCount = powderBll.GetCurrentUserTourByAreaStats();
                if (TourByAreaCount != null && TourByAreaCount.Count > 0)
                {
                    StringBuilder strTour = new StringBuilder();
                    foreach (EyouSoft.Model.TourStructure.AreaStatInfo AreaStaModel in TourByAreaCount)
                    {
                        strTour.Append("<a class=\"lan14\" href=\"/routeagency/scatteredfightplan.aspx?lineId=" + AreaStaModel.AreaId.ToString() + "\" onclick=\"topTab.open($(this).attr('href'),'我的散拼计划');return false;\">" + AreaStaModel.AreaName + "(" + AreaStaModel.Number.ToString() + ")</a>");
                    }
                    this.lblRoutePlanCount.Text = strTour.ToString();
                }

                dic = iorderBll.GetOrderBusinessCount(UserInfoModel.CompanyID);
                if (dic != null)
                {
                    //获得专线订单信息
                    if (dic.ContainsKey("有效散客订单") && dic.ContainsKey("散客订单未处理") && dic.ContainsKey("散客预留待付款") && dic.ContainsKey("散客订单已确认"))
                    {
                        this.lblRouteOrderFrist.Text  = "有效散客订单:<a href=\"/routeagency/allfitorders.aspx\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'所有散拼订单');return false;\"><b>" + dic["有效散客订单"].ToString() + "单</b></a>,";
                        this.lblRouteOrderFrist.Text += "其中未处理<a href=\"/routeagency/allfitorders.aspx?statue=2\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'所有散拼订单');return false;\"><b>" + dic["散客订单未处理"].ToString() + "单</b></a>,";
                        this.lblRouteOrderFrist.Text += "预留待付款<a href=\"/routeagency/allfitorders.aspx?statue=3\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'所有散拼订单');return false;\"><b>" + dic["散客预留待付款"].ToString() + "单</b></a>,";
                        this.lblRouteOrderFrist.Text += "已确认:<a href=\"/routeagency/allfitorders.aspx?statue=6\" onclick=\"topTab.open($(this).attr('href'),'所有散拼订单');return false;\"><b>" + dic["散客订单已确认"].ToString() + "单</b></a>";
                    }

                    if (dic.ContainsKey("团队订单") && dic.ContainsKey("团队订单未处理") && dic.ContainsKey("团队订单已确认"))
                    {
                        this.lblRouteOrderSecond.Text  = "有效团队订单:共有<a href=\"/teamservice/teamorders.aspx?routeSource=1\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'团队订单管理');return false;\"><b>" + dic["团队订单"].ToString() + "单</b></a>,";
                        this.lblRouteOrderSecond.Text += "其中未处理<a href=\"/teamservice/teamorders.aspx?routeSource=1&status=0\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'团队订单管理');return false;\"><b>" + dic["团队订单未处理"].ToString() + "单</b></a>,";
                        this.lblRouteOrderSecond.Text += " 已确认:<a href=\"/teamservice/teamorders.aspx?routeSource=1&status=1\" onclick=\"topTab.open($(this).attr('href'),'团队订单管理');return false;\"><b>" + dic["团队订单已确认"] + "单</b></a>";
                    }

                    if (dic.ContainsKey("历史订单") && dic.ContainsKey("成人数") && dic.ContainsKey("儿童数"))
                    {
                        this.lblRouteOrderThird.Text = "历史订单:共计<a class=\"ff0000\"><b>" + dic["历史订单"].ToString() + "单</b></a>,人数" + dic["成人数"].ToString() + "大" + dic["儿童数"].ToString() + "小";
                    }
                }

                //获得专线商的访问数量
                this.lblBrowseUserCount.Text = TourBll.GetVisitedNumberByCompany(UserInfoModel.CompanyID).ToString();
            }
            #endregion

            #region 地接提醒
            if (IsLocalAgency)
            {
                //获得地接线路区域信息

                IList <EyouSoft.Model.TourStructure.AreaStatInfo> routeByAreaCount = routeBll.GetCurrentUserRouteByAreaStats();
                if (routeByAreaCount != null && routeByAreaCount.Count > 0)
                {
                    StringBuilder strTour = new StringBuilder();
                    foreach (EyouSoft.Model.TourStructure.AreaStatInfo AreaStaModel in routeByAreaCount)
                    {
                        strTour.Append("<a href='/routeagency/routemanage/routeview.aspx?routeSource=2' onclick=\"topTab.open($(this).attr('href'),'我的线路库',{isRefresh:false,data:{AreaId:" + AreaStaModel.AreaId + "}});return false;\" class='lan14'>" + AreaStaModel.AreaName + "(" + AreaStaModel.Number + ")</a><br />");
                    }
                    this.lblLocalRoute.Text = strTour.ToString();
                }

                dic = iorderBll.GetOrderGroundCount(UserInfoModel.CompanyID);
                if (dic != null)
                {
                    //获得地接团队订单信息
                    if (dic.ContainsKey("有效团队订单") && dic.ContainsKey("团队订单未处理") && dic.ContainsKey("团队订单已处理"))
                    {
                        this.lblLocalOrderCount.Text  = "有效团队订单:共有<a href=\"/teamservice/teamorders.aspx?routeSource=2\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'团队订单管理');return false;\"><b>" + dic["有效团队订单"].ToString() + "单</b></a>,";
                        this.lblLocalOrderCount.Text += "其中未处理<a href=\"/teamservice/teamorders.aspx?routeSource=2&status=0\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'团队订单管理');return false;\"><b>" + dic["团队订单未处理"].ToString() + "单</b></a>,";
                        this.lblLocalOrderCount.Text += "已确认:<a href=\"/teamservice/teamorders.aspx?routeSource=2&status=1\" onclick=\"topTab.open($(this).attr('href'),'团队订单管理');return false;\"><b>" + dic["团队订单已处理"].ToString() + "单</b></a>";
                    }
                }
            }
            #endregion

            #region 景区提醒
            if (IsSightAgency)
            {
                //获得将过期景点门票
                this.lblScenicCountOver.Text = "您当前共有<a href=\"/ScenicManage/MyScenice.aspx\" onclick=\"topTab.open($(this).attr('href'),'我的景区');return false;\">" + EyouSoft.BLL.ScenicStructure.BScenicTickets.CreateInstance().GetExpireTickets(UserInfoModel.CompanyID).ToString() + "个景区门票</a>将于1周后到期,请及时更新计划,以方便旅行社查询";
                int recordCount = 0;
                IList <EyouSoft.Model.ScenicStructure.MScenicArea> scenicList = EyouSoft.BLL.ScenicStructure.BScenicArea.CreateInstance().GetListAndTickets(3, 1, ref recordCount, null);

                if (scenicList != null && scenicList.Count > 0)
                {
                    string sbScenic = "";
                    for (int i = 0; i < scenicList.Count; i++)
                    {
                        sbScenic += "<a class=\"lan14\" href=\"/ScenicManage/MyScenice.aspx\" onclick=\"topTab.open($(this).attr('href'),'我的景区');return false;\">" + scenicList[i].ScenicName + "</a>&nbsp;&nbsp;";
                    }
                    this.lblScenicCount.Text = sbScenic;
                }
            }
            #endregion
            #endregion
        }
Beispiel #7
0
        /// <summary>
        /// 初始化基础信息
        /// </summary>
        private void InitBasicInfo()
        {
            if (UserInfoModel != null)
            {
                this.ltrCompanyName.Text = UserInfoModel.CompanyName;
            }
            EyouSoft.IBLL.CompanyStructure.ICompanyInfo       CompanyInfo      = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance();
            EyouSoft.Model.CompanyStructure.CompanyDetailInfo CompanyInfoModel = CompanyInfo.GetModel(UserInfoModel.CompanyID);
            if (CompanyInfoModel != null)
            {
                if (!String.IsNullOrEmpty(CompanyInfoModel.AttachInfo.CompanyLogo.ImagePath))
                {
                    this.imgLogo.Src = Domain.FileSystem + CompanyInfoModel.AttachInfo.CompanyLogo.ImagePath;
                }
                else
                {
                    this.imgLogo.Src = ImageServerPath + "/images/logo.gif";
                }
            }

            EyouSoft.IBLL.CompanyStructure.ICompanySetting CSetBll   = EyouSoft.BLL.CompanyStructure.CompanySetting.CreateInstance();
            EyouSoft.Model.CompanyStructure.CompanySetting CSetModel = CSetBll.GetModel(UserInfoModel.CompanyID);
            if (CSetModel != null)
            {
                switch (CSetModel.FirstMenu)
                {
                case EyouSoft.Model.CompanyStructure.MenuSection.专线服务:
                    FirstMenu = "0";
                    break;

                case EyouSoft.Model.CompanyStructure.MenuSection.组团服务:
                    FirstMenu = "1";
                    break;

                case EyouSoft.Model.CompanyStructure.MenuSection.地接服务:
                    FirstMenu = "2";
                    break;

                case EyouSoft.Model.CompanyStructure.MenuSection.景区服务:
                    FirstMenu = "3";
                    break;

                default:
                    FirstMenu = "1";
                    break;
                }
            }

            #region 专线和组团显示控制
            EyouSoft.Model.CompanyStructure.CompanyRole   RoleModel = UserInfoModel.CompanyRole;
            EyouSoft.Model.CompanyStructure.CompanyType[] enumType  = RoleModel.RoleItems;

            if (enumType.Length > 0)
            {
                foreach (EyouSoft.Model.CompanyStructure.CompanyType type in enumType)
                {
                    if (type == EyouSoft.Model.CompanyStructure.CompanyType.专线)
                    {
                        IsRouteAgency = true;
                    }
                    else if (type == EyouSoft.Model.CompanyStructure.CompanyType.组团 ||
                             type == EyouSoft.Model.CompanyStructure.CompanyType.其他采购商)
                    {
                        IsTourAgency = true;
                    }
                    else if (type == EyouSoft.Model.CompanyStructure.CompanyType.地接)
                    {
                        IsLocalAgency = true;
                    }
                    else if (type == EyouSoft.Model.CompanyStructure.CompanyType.景区)
                    {
                        IsSightAgency = true;
                    }
                    else
                    {
                        IsOther = true;
                    }
                }
                if (IsRouteAgency)   // 仅为专线
                {
                    this.div_RouteAgency.Visible = true;
                    //景区门票后台搜索页
                    divSceniceList.Visible = true;
                }
                if (IsTourAgency)     // 仅为组团
                {
                    this.div_TourAgency.Visible = true;
                    //景区门票后台搜索页
                    divSceniceList.Visible = true;
                }
                if (IsLocalAgency)
                {   // 地接
                    this.div_LocalAgency.Visible = true;
                    //景区门票后台搜索页
                    divSceniceList.Visible = true;
                }
                if (!IsRouteAgency && !IsTourAgency && IsLocalAgency)
                {
                    //景区门票后台搜索页
                    divSceniceList.Visible = true;
                }
                if (IsSightAgency)
                {
                    div_SightAgency.Visible = true;
                    divHotelCenter.Visible  = false;
                    //景区门票后台搜索页
                    divSceniceList.Visible = true;
                    //我的网店链接地址
                    hrefSightShop.HRef = IsOpenHighShop
                                             ? "/EShop/SightShop/SightShopDefault.aspx"
                                             : "/GeneralShop/SightShop/Default.aspx";
                }

                #region ZhouWenChao 2011-03-07  注释,原因是酒店用户进入不了后台

                //if (IsOther)
                //{
                //    Utils.ShowError("对不起,您不是旅行社账户!", "");
                //    return;
                //}

                #endregion
            }
            #endregion
        }
Beispiel #8
0
        /// <summary>
        /// 修改公司信息
        /// </summary>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            //省份ID
            int ProvinceId = EyouSoft.Common.Utils.GetInt(Request.Form["dropProvinceId"]);
            //城市ID
            int CityId = EyouSoft.Common.Utils.GetInt(Request.Form["dropCityId"]);
            //县区ID
            int CountyId = EyouSoft.Common.Utils.GetInt(Request.Form["dropCountyId"]);
            //公司名称
            string txtCompanyName = Utils.InputText(this.txtCompanyName.Value.Trim());
            //许可证号
            string txtLicenseNumber = Utils.InputText(this.txtLicenseNumber.Value.Trim());
            //名牌名称
            string txtBrandName = Utils.InputText(this.txtBrandName.Value.Trim());
            //用户名
            string txtUserName = Utils.InputText(this.txtUserName.Value.Trim());
            //密码
            string NewPassWord = "";

            if (!string.IsNullOrEmpty(this.txtPassWord.Value.Trim()))
            {
                NewPassWord = Utils.InputText(this.txtPassWord.Value.Trim());
            }
            //联系人名称
            string txtContactName = Utils.InputText(this.txtContactName.Value.Trim());

            //联系电话
            string txtContactTel = Utils.InputText(this.txtContactTel.Value.Trim());
            //联系手机
            string txtContactMobile = Utils.InputText(this.txtContactMobile.Value.Trim());
            //传真
            string txtContactFax = Utils.InputText(this.txtContactFax.Value.Trim());
            //办公地点
            string txtOfficeAddress = Utils.InputText(this.txtOfficeAddress.Value.Trim());
            //MQ
            string txtContactQQ = Utils.InputText(this.txtContactQQ.Value.Trim(), 100);
            //MSN
            string txtContactMSN = Utils.InputText(this.txtContactMSN.Value.Trim());
            //Email
            string txtContactEmail = Utils.InputText(this.txtContactEmail.Value.Trim());
            //经营范围
            string CompanyType = Utils.InputText(Request.Form["radManageArea"]);

            if (CompanyType == "")
            {
                //旅行社
                CompanyType = Utils.InputText(Request.Form["ckCompanyType"]);

                //专线商时有销售城市及经营线路区域
            }
            //公司介绍
            string txtCompanyInfo = Utils.EditInputText(this.txtCompanyInfo.Value.Trim());
            //业务优势
            string txtBusinessSuperior = Utils.InputText(this.txtBusinessSuperior.Value.Trim());

            #region  公司银行账户
            string txtCompanyBackName   = Utils.InputText(this.txtCompanyBackName.Value.Trim());
            string txtCompanyBack       = Utils.InputText(this.txtCompanyBack.Value.Trim());
            string txtCompanyBackNumber = Utils.InputText(this.txtCompanyBackNumber.Value.Trim());
            #endregion

            #region 个人银行账户
            string[] txtBankAccountName = Request.Form.GetValues("txtBankAccountName");
            string[] txtBankName        = Request.Form.GetValues("txtBankName");
            string[] txtAccountNumber   = Request.Form.GetValues("txtAccountNumber");
            #endregion

            EyouSoft.Model.CompanyStructure.CompanyArchiveInfo model = new EyouSoft.Model.CompanyStructure.CompanyArchiveInfo();

            /*公司信息*/
            model.ID             = EditId;
            model.CompanyName    = txtCompanyName;
            model.ProvinceId     = ProvinceId;
            model.CityId         = CityId;
            model.CountyId       = CountyId;
            model.CompanyAddress = txtOfficeAddress;
            model.CompanyBrand   = txtBrandName;
            model.License        = txtLicenseNumber;
            model.Remark         = txtCompanyInfo;
            model.ShortRemark    = txtBusinessSuperior;

            /*证书管理 */

            EyouSoft.Model.CompanyStructure.CompanyAttachInfo AttachInfo = new EyouSoft.Model.CompanyStructure.CompanyAttachInfo();
            EyouSoft.Model.CompanyStructure.BusinessCertif    Buiness    = new EyouSoft.Model.CompanyStructure.BusinessCertif();
            string LicenceImg = Request.Form["SingleFilelLicence$hidFileName"];
            if (string.IsNullOrEmpty(LicenceImg) && this.hidOldLicenceImg.Value != "")
            {
                LicenceImg = this.hidOldLicenceImg.Value;
            }
            string BusinessCertImg = Request.Form["SingleFileBusinessCertImg$hidFileName"];
            if (string.IsNullOrEmpty(BusinessCertImg) && this.hidOldBusinessCertImg.Value != "")
            {
                BusinessCertImg = this.hidOldBusinessCertImg.Value;
            }
            string TaxRegImg = Request.Form["SingleFileTaxRegImg$hidFileName"];
            if (string.IsNullOrEmpty(TaxRegImg) && this.hidOldTaxRegImg.Value != "")
            {
                TaxRegImg = this.hidOldTaxRegImg.Value;
            }
            Buiness.LicenceImg      = LicenceImg;
            Buiness.BusinessCertImg = BusinessCertImg;
            Buiness.TaxRegImg       = TaxRegImg;

            AttachInfo.BusinessCertif = Buiness;
            Buiness = null;

            model.AttachInfo = AttachInfo;
            AttachInfo       = null;


            EyouSoft.Model.CompanyStructure.UserAccount UserModel = new EyouSoft.Model.CompanyStructure.UserAccount();
            #region 用户信息
            /*用户信息*/
            UserModel.UserName = txtUserName;
            UserModel.PassWordInfo.NoEncryptPassword = NewPassWord;
            #endregion
            model.AdminAccount = UserModel;
            UserModel          = null;

            EyouSoft.Model.CompanyStructure.ContactPersonInfo ContactModel = new EyouSoft.Model.CompanyStructure.ContactPersonInfo();
            #region 公司联系人信息
            /* 公司联系人信息 */
            ContactModel.ContactName = txtContactName;
            ContactModel.Tel         = txtContactTel;
            ContactModel.Mobile      = txtContactMobile;
            ContactModel.Fax         = txtContactFax;
            ContactModel.QQ          = txtContactQQ;
            ContactModel.MSN         = txtContactMSN;
            ContactModel.Email       = txtContactEmail;
            #endregion
            model.ContactInfo = ContactModel;
            ContactModel      = null;

            #region 公司身份
            /* 公司身份 */
            EyouSoft.Model.CompanyStructure.CompanyRole RoleMode = new EyouSoft.Model.CompanyStructure.CompanyRole();
            EyouSoft.Model.CompanyStructure.CompanyType TypeEmnu = EyouSoft.Model.CompanyStructure.CompanyType.全部;
            //旅行社
            if (CompanyType == "0")
            {
                string[] strType = Request.Form.GetValues("ckCompanyType");
                for (int i = 0; i < strType.Length; i++)
                {
                    if (strType[i] == "1")
                    {
                        TypeEmnu = EyouSoft.Model.CompanyStructure.CompanyType.专线;

                        string[] strSalelist = Request.Form.GetValues("ckSellCity");
                        if (strSalelist != null)
                        {
                            //设置销售城市
                            List <EyouSoft.Model.SystemStructure.CityBase> SaleCity = new List <EyouSoft.Model.SystemStructure.CityBase>();
                            for (int j = 0; j < strSalelist.Length; j++)
                            {
                                EyouSoft.Model.SystemStructure.CityBase item = new EyouSoft.Model.SystemStructure.CityBase();
                                item.ProvinceId = ProvinceId;
                                item.CityId     = EyouSoft.Common.Function.StringValidate.GetIntValue(strSalelist[j]);
                                SaleCity.Add(item);
                                item = null;
                            }
                            model.SaleCity = SaleCity;
                            SaleCity       = null;
                        }
                        //设置经营线路区域
                        string[] strAreaList = Request.Form.GetValues("checkbox_Area");

                        if (strAreaList != null)
                        {
                            List <EyouSoft.Model.SystemStructure.AreaBase> AreaList = new List <EyouSoft.Model.SystemStructure.AreaBase>();
                            for (int j = 0; j < strAreaList.Length; j++)
                            {
                                EyouSoft.Model.SystemStructure.AreaBase item = new EyouSoft.Model.SystemStructure.AreaBase();
                                item.AreaId = Convert.ToInt32(strAreaList[j]);
                                AreaList.Add(item);
                                item = null;
                            }
                            model.Area = AreaList;
                            AreaList   = null;
                        }
                    }
                    if (strType[i] == "2")
                    {
                        TypeEmnu = EyouSoft.Model.CompanyStructure.CompanyType.组团;
                    }
                    if (strType[i] == "3")
                    {
                        TypeEmnu = EyouSoft.Model.CompanyStructure.CompanyType.地接;
                    }
                    RoleMode.SetRole(TypeEmnu);
                }
            }
            else
            {
                switch (CompanyType)
                {
                case "4":
                    TypeEmnu = EyouSoft.Model.CompanyStructure.CompanyType.景区;
                    break;

                case "5":
                    TypeEmnu = EyouSoft.Model.CompanyStructure.CompanyType.酒店;
                    break;

                case "6":
                    TypeEmnu = EyouSoft.Model.CompanyStructure.CompanyType.车队;
                    break;

                case "7":
                    TypeEmnu = EyouSoft.Model.CompanyStructure.CompanyType.旅游用品店;
                    break;

                case "8":
                    TypeEmnu = EyouSoft.Model.CompanyStructure.CompanyType.购物店;
                    break;

                case "9":
                    TypeEmnu = EyouSoft.Model.CompanyStructure.CompanyType.机票供应商;
                    break;

                case "10":
                    TypeEmnu = EyouSoft.Model.CompanyStructure.CompanyType.其他采购商;
                    break;

                case "11":
                    TypeEmnu = EyouSoft.Model.CompanyStructure.CompanyType.随便逛逛;
                    break;
                }
                RoleMode.SetRole(TypeEmnu);
            }
            #endregion
            model.CompanyRole = RoleMode;
            RoleMode          = null;

            List <EyouSoft.Model.CompanyStructure.BankAccount> BankList = new List <EyouSoft.Model.CompanyStructure.BankAccount>();
            #region 银行账号
            /* 公司银行账户信息 */
            EyouSoft.Model.CompanyStructure.BankAccount BankCompanyModel = new EyouSoft.Model.CompanyStructure.BankAccount();
            BankCompanyModel.AccountType     = EyouSoft.Model.CompanyStructure.BankAccountType.公司;
            BankCompanyModel.BankAccountName = txtCompanyBackName;
            BankCompanyModel.BankName        = txtCompanyBack;
            BankCompanyModel.AccountNumber   = txtCompanyBackNumber;
            BankCompanyModel.CompanyID       = EditId;
            BankList.Add(BankCompanyModel);
            BankCompanyModel = null;
            if (!string.IsNullOrEmpty(txtBankAccountName.ToString()))
            {
                /* 个人银行帐户信息 */
                for (int i = 0; i < txtBankAccountName.Length; i++)
                {
                    if (!string.IsNullOrEmpty(txtBankAccountName[i]))
                    {
                        EyouSoft.Model.CompanyStructure.BankAccount BankModel = new EyouSoft.Model.CompanyStructure.BankAccount();
                        BankModel.AccountType     = EyouSoft.Model.CompanyStructure.BankAccountType.个人;
                        BankModel.BankAccountName = txtBankAccountName[i];
                        BankModel.BankName        = txtBankName[i];
                        BankModel.AccountNumber   = txtAccountNumber[i];
                        BankModel.CompanyID       = EditId;
                        BankList.Add(BankModel);
                        BankModel = null;
                    }
                }
            }
            #endregion
            model.BankAccounts = BankList;
            BankList           = null;

            bool Result = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().Update(model);
            if (Result)
            {
                if (EyouSoft.Common.Utils.GetQueryStringValue("type") == "list")
                {
                    Response.Write("<script language='javascript'>alert('修改成功!');parent.Boxy.getIframeDialog('" + Request.QueryString["iframeid"] + "').hide();</script>");
                }
                else
                {
                    EyouSoft.Common.Function.MessageBox.ShowAndRedirect(this.Page, "修改成功!", returnUrl);
                }
            }
            else
            {
                EyouSoft.Common.Function.MessageBox.Show(this.Page, "修改失败!");
            }
            model = null;
        }
Beispiel #9
0
        /// <summary>
        /// 供应商单位信息保存
        /// </summary>
        private void SupplyInfoSave()
        {
            if (!IsCompanyCheck)
            {
                Response.Clear();
                Response.Write("[{isSuccess:false,Message:'对不起,新注册用户还未审核,没有权限进入供应商网店管理!'}]");
                Response.End();
            }
            bool   isTrue  = false;
            string webSite = string.Empty;

            EyouSoft.IBLL.CompanyStructure.ISupplierInfo       Ibll  = EyouSoft.BLL.CompanyStructure.SupplierInfo.CreateInstance();
            EyouSoft.Model.CompanyStructure.SupplierInfo       model = new EyouSoft.Model.CompanyStructure.SupplierInfo();
            IList <EyouSoft.Model.CompanyStructure.CompanyTag> lists = new List <EyouSoft.Model.CompanyStructure.CompanyTag>();

            EyouSoft.Model.CompanyStructure.CompanyRole RoleModel = new EyouSoft.Model.CompanyStructure.CompanyRole();
            model.ID             = CompanyID;
            model.CompanyName    = this.SiteUserInfo.CompanyName;//Utils.GetFormValue("MyOwenerShop_CompanyName");
            model.CompanyAddress = Utils.GetFormValue("MyOwenerShop_ConnectAddress");
            string Remark = Server.UrlDecode(Request.Form["MyOwenerShop_Remark"]);

            model.Remark = Utils.EditInputText(Server.UrlDecode(Remark.Substring(0, Remark.Length > 4000 ? 4000 : Remark.Length)));

            model.ContactInfo.Fax         = Utils.GetFormValue("MyOwenerShop_ConnectFax");
            model.ContactInfo.Tel         = Utils.GetFormValue("MyOwenerShop_ConnectTel");
            model.ContactInfo.Email       = Utils.GetFormValue("MyOwenerShop_ConnectEmail");
            model.ContactInfo.Mobile      = Utils.GetFormValue("MyOwenerShop_Mobile");
            model.ContactInfo.ContactName = Utils.GetFormValue("MyOwenerShop_ConnectName");
            model.ProvinceId = Utils.GetInt(Request.Form["ctl00$ContentPlaceHolder1$ProvinceAndCityList1$ddl_ProvinceList"]);
            model.CityId     = Utils.GetInt(Request.Form["ctl00$ContentPlaceHolder1$ProvinceAndCityList1$ddl_CityList"]);
            webSite          = Utils.GetFormValue("MyOwenerShop_WebSite");
            if (webSite != "")
            {
                model.WebSite = (webSite != "" && webSite.Contains("http://")) ? webSite : "http://" + webSite;
            }
            else
            {
                model.WebSite = webSite;
            }
            model.CompanyImgThumb = Utils.GetFormValue("ctl00$ContentPlaceHolder1$Upload_LogoImg$hidFileName");

            model.ShortRemark = Utils.GetFormValue("MyOwenerShop_ShortRemark");
            if (string.IsNullOrEmpty(model.CompanyImgThumb))
            {
                model.CompanyImgThumb = Utils.GetFormValue("hidLogoImg");
            }
            if (companyType == EyouSoft.Model.CompanyStructure.CompanyType.酒店)
            {
                EyouSoft.Model.CompanyStructure.CompanyTag sysModel;
                string[] strCompanyTag = Utils.GetFormValues("cbCompanyTag");
                for (int i = 0; i < strCompanyTag.Length; i++)
                {
                    sysModel           = new EyouSoft.Model.CompanyStructure.CompanyTag();
                    sysModel.FieldId   = Utils.GetInt(strCompanyTag[i]);
                    sysModel.FieldName = Utils.GetFormValue("hidCompanyTag" + strCompanyTag[i]);
                    lists.Add(sysModel);
                    sysModel = null;
                }
                EyouSoft.Model.CompanyStructure.HotelLevel level = (EyouSoft.Model.CompanyStructure.HotelLevel)Enum.Parse(typeof(EyouSoft.Model.CompanyStructure.HotelLevel), Utils.GetFormValue("ctl00$ContentPlaceHolder1$rbl_HotelLevel"));
                model.CompanyLevel = (int)level;
                model.CompanyTag   = lists;
            }
            isTrue = Ibll.Update(model);
            Ibll   = null;
            model  = null;
            lists  = null;
            if (isTrue)
            {
                Response.Clear();
                Response.Write("1");
                Response.End();
            }
        }
Beispiel #10
0
        protected string FormSubmit()
        {
            //获得表单值
            //公司名称
            string companyName = Utils.GetFormValue("txtCompanyName");
            //用户名
            string userName = Utils.GetFormValue("u");
            //用户密码
            string userPwd = Utils.GetFormValue("p");
            //确认密码
            string userPwdTwo = Utils.GetFormValue("txtPwdTwo");
            //真实姓名
            string trueName = Utils.GetFormValue("txtTrueName");
            //手机号码
            string userMobile = Utils.GetFormValue("txtPhone");
            //邮箱
            string userEmail = Utils.GetFormValue("txtEmail");
            //用户QQ
            string userQQ = Utils.GetFormValue("txtQQ");
            //省份ID
            int provinceID = Utils.GetInt(Utils.GetFormValue("ProvinceAndCityList1$ddl_ProvinceList"));
            //城市ID
            int cityID = Utils.GetInt(Utils.GetFormValue("ProvinceAndCityList1$ddl_CityList"));

            #region 验证
            if (companyName.Trim() == "")
            {
                return("用户名不能为空");
            }

            if (userPwd.Trim() == "")
            {
                return("密码不能为空");
            }
            if (userPwd.Trim() != userPwdTwo.Trim())
            {
                return("两次密码不一致");
            }
            if (trueName.Trim() == "")
            {
                return("真实姓名不能为空");
            }
            if (userMobile.Trim() == "")
            {
                return("手机号码不能为空");
            }
            if (userEmail.Trim() == "")
            {
                return("不能为空");
            }

            if (userQQ.Trim() == "")
            {
                return("QQ不能为空");
            }
            if (provinceID <= 0)
            {
                return("请选择一个省份");
            }
            if (cityID <= 0)
            {
                return("请选择一个城市");
            }
            #endregion


            /*公司信息*/
            EyouSoft.Model.CompanyStructure.CompanyArchiveInfo model = new EyouSoft.Model.CompanyStructure.CompanyArchiveInfo();
            /*用户信息*/
            EyouSoft.Model.CompanyStructure.UserAccount UserModel = new EyouSoft.Model.CompanyStructure.UserAccount();
            /* 公司联系人信息 */
            EyouSoft.Model.CompanyStructure.ContactPersonInfo ContactModel = new EyouSoft.Model.CompanyStructure.ContactPersonInfo();
            string OtherSaleCity = "";



            UserModel.UserName = userName; /*用户信息*/

            UserModel.PassWordInfo.NoEncryptPassword = userPwd;
            ContactModel.ContactName = trueName;
            ContactModel.Mobile      = userMobile;
            ContactModel.Email       = userEmail;

            /*公司信息*/
            model.CompanyName = companyName;
            model.ProvinceId  = provinceID;
            model.CityId      = CityId;

            /* 公司身份 */
            EyouSoft.Model.CompanyStructure.CompanyRole RoleMode = new EyouSoft.Model.CompanyStructure.CompanyRole();
            EyouSoft.Model.CompanyStructure.CompanyType TypeEmnu = EyouSoft.Model.CompanyStructure.CompanyType.组团;


            RoleMode.SetRole(TypeEmnu);
            model.CompanyRole = RoleMode;


            model.AdminAccount = UserModel;
            model.ContactInfo  = ContactModel;


            EyouSoft.Model.ResultStructure.UserResultInfo Result = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().Add(model, OtherSaleCity);

            if (Result == EyouSoft.Model.ResultStructure.UserResultInfo.Succeed)
            {
                return("OK");
            }
            else
            {
                return("Error");
            }
        }