Beispiel #1
0
        protected void InitBindCompany()
        {
            CustomerInfo = new EyouSoft.Model.CompanyStructure.CustomerInfo();
            //省份
            int Province = this.ProvinceList1.ProvinceId;
            //城市
            int CityID = this.CityList1.CityId;
            //单位名称
            string UnitsName = Utils.GetString(Utils.GetFormValue(Txt_UnitsName.UniqueID.Trim()), "");

            if (Utils.InputText(UnitsName) == "")
            {
                MessageBox.Show(this, "请填写单位名称!");
                return;
            }
            //许可证号
            string LicenseNumber = Utils.GetString(Utils.GetFormValue(Txt_LicenseNumber.UniqueID), "");
            //公司地址
            string CompanyAddress = Utils.GetString(Utils.GetFormValue(Txt_CompanyAddress.UniqueID), "");
            //邮编
            string Code = Utils.GetString(Utils.GetFormValue(Txt_Code.UniqueID), "");
            //银行账号
            string AccountNumber = Utils.GetString(Utils.GetFormValue(Txt_AccountNumber.UniqueID), "");
            //返佣类型
            string ReBateType = Utils.GetString(Utils.GetFormValue(DDlReBateType.UniqueID), "");
            //主要联系人
            string Contact = Utils.GetString(Utils.GetFormValue(Txt_Contact.UniqueID), "");

            if (Utils.InputText(Contact) == "")
            {
                MessageBox.Show(this, "请填写主要联系人!");
                return;
            }
            //电话
            string Tel = Utils.GetString(Utils.GetFormValue(Txt_Phone.UniqueID), "");

            if (Utils.InputText(Tel) == "")
            {
                MessageBox.Show(this, "请填写联系电话号码!");
                return;
            }
            //手机
            string Moblie = Utils.GetString(Utils.GetFormValue(Txt_Mobile.UniqueID), "");
            //传真
            string Fox = Utils.GetString(Utils.GetFormValue(Txt_Fox.UniqueID), "");
            //备注
            string Remirke = Utils.GetString(Utils.GetFormValue(Txt_Remirke.UniqueID), "");

            CustomerInfo.ProviceId      = Province;
            CustomerInfo.CityId         = CityID;
            CustomerInfo.Name           = UnitsName;
            CustomerInfo.Licence        = LicenseNumber;
            CustomerInfo.Adress         = CompanyAddress;
            CustomerInfo.PostalCode     = Code;
            CustomerInfo.BankAccount    = AccountNumber;
            CustomerInfo.CommissionType = (EyouSoft.Model.EnumType.CompanyStructure.CommissionType)Enum.Parse(typeof(EyouSoft.Model.EnumType.CompanyStructure.CommissionType), ReBateType);
            CustomerInfo.ContactName    = Contact;
            CustomerInfo.Phone          = Tel;
            CustomerInfo.Mobile         = Moblie;
            CustomerInfo.Fax            = Fox;
            CustomerInfo.Remark         = Remirke;
            CustomerInfo.Id             = SiteUserInfo.TourCompany.TourCompanyId;

            //更新组团端公司信息
            if (Customer.UpdateSampleCustomer(CustomerInfo))
            {
                SetErrorMsg(true, "公司信息设置成功!", "/GroupEnd/SystemSetting/CompanyInfo.aspx");
            }
            else
            {
                SetErrorMsg(false, "公司信息设置失败!", "/GroupEnd/SystemSetting/CompanyInfo.aspx");
            }
        }