Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!CheckGrant(global::Common.Enum.TravelPermission.系统设置_基础设置_客户等级栏目))
            {
                Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.系统设置_基础设置_客户等级栏目, true);
                return;
            }
            int custId = Utils.GetInt(Utils.GetQueryStringValue("custId"));//客户等级Id

            pageIndex  = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);
            itemIndex2 = (pageIndex - 1) * pageSize + 1;
            EyouSoft.BLL.CompanyStructure.CompanyCustomStand customStandBll = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand();//初始化custbll
            //报价Id不为空执行删除操作
            if (custId != 0)
            {
                if (Utils.GetQueryStringValue("method") == "ispublish")                                                                    //验证该区域是否有线路存在
                {
                    EyouSoft.BLL.CompanyStructure.CompanyPriceStand priceStandBll = new EyouSoft.BLL.CompanyStructure.CompanyPriceStand(); //初始化报价bll
                    Utils.ResponseMeg(priceStandBll.IsUsed(custId, CurrentUserCompanyID, 0), "");
                    return;
                }
                bool result = customStandBll.Delete(custId);
                MessageBox.ShowAndRedirect(this, result ? "删除成功" : "删除失败", "/systemset/basicinfo/CustomerLevel.aspx");
                return;
            }
            //绑定客户等级列表
            IList <EyouSoft.Model.CompanyStructure.CustomStand> list = customStandBll.GetList(pageSize, pageIndex, ref recordCount, CurrentUserCompanyID);

            if (list != null && list.Count > 0)
            {
                rptCustLevel.DataSource = list;
                rptCustLevel.DataBind();
                BindExportPage();
            }
            else
            {
                rptCustLevel.EmptyText       = "<tr><td colspan='6' align='center'>对不起,暂无客户等级信息!</td></tr>";
                this.ExportPageInfo1.Visible = false;
            }
        }
Example #2
0
        protected void rpt_price_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (list == null)
            {
                list = new List <EyouSoft.Model.CompanyStructure.CustomStand>();
                EyouSoft.BLL.CompanyStructure.CompanyCustomStand bll = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand();
                int kkk = 0;
                list = bll.GetList(100, 1, ref kkk, CurrentUserCompanyID);
            }
            EyouSoft.Model.TourStructure.TourPriceStandardInfo mm = e.Item.DataItem as EyouSoft.Model.TourStructure.TourPriceStandardInfo;
            Repeater rpt = e.Item.FindControl("rpt_list") as Repeater;

            if (model != null)
            {
                //IList<EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo> plist = model.PriceStandards[e.Item.ItemIndex].CustomerLevels;


                EyouSoft.BLL.TourStructure.Tour tour = new EyouSoft.BLL.TourStructure.Tour();
                IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo>      listStand = ((EyouSoft.Model.TourStructure.TourInfo)tour.GetTourInfo(Request.QueryString["tourId"])).PriceStandards;
                IList <EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo> plist     = listStand[e.Item.ItemIndex].CustomerLevels;
                //for (int j = 0; j < ilist.Count; j++)
                //{
                //    //if(listStand[i].CustomerLevels[i].LevelId == list.sel)
                //    if (list != null)
                //    {
                //        var vn = list.Where(x => x.Id == ilist[j].LevelId).FirstOrDefault();
                //        if (vn != null)
                //            ilist[j].LevelName = vn.CustomStandName;
                //    }
                //}
                for (int i = 0; i < listStand.Count; i++)
                {
                    for (int j = 0; j < list.Count; j++)
                    {
                        //if(listStand[i].CustomerLevels[i].LevelId == list.sel)
                        if (listStand[i].CustomerLevels.Count > j)
                        {
                            var vn = list.Where(x => x.Id == listStand[i].CustomerLevels[j].LevelId).FirstOrDefault();
                            if (vn != null)
                            {
                                listStand[i].CustomerLevels[j].LevelName = vn.CustomStandName;
                            }
                            else
                            {
                                listStand[i].CustomerLevels.RemoveAt(j);
                            }
                        }
                        var xn = listStand[i].CustomerLevels.Where(x => x.LevelId == list[j].Id).FirstOrDefault();
                        if (xn == null)
                        {
                            listStand[i].CustomerLevels.Add(new EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo()
                            {
                                LevelId = list[j].Id, LevelType = list[j].LevType, LevelName = list[j].CustomStandName, AdultPrice = 0, ChildrenPrice = 0
                            });
                        }
                    }
                }
                rpt.DataSource = plist;
                rpt.DataBind();
            }
        }
Example #3
0
        void SaveInfo()
        {
            xlId = EyouSoft.Common.Utils.GetInt(Request.QueryString["id"]);
            EyouSoft.BLL.RouteStructure.Route       rout  = new EyouSoft.BLL.RouteStructure.Route();
            EyouSoft.Model.RouteStructure.RouteInfo model = rout.GetRouteInfo(xlId);
            EyouSoft.BLL.TourStructure.Tour         tour  = new EyouSoft.BLL.TourStructure.Tour();
            EyouSoft.Model.TourStructure.TourInfo   info  = new EyouSoft.Model.TourStructure.TourInfo();

            IList <EyouSoft.Model.CompanyStructure.CustomStand> listcus = new List <EyouSoft.Model.CompanyStructure.CustomStand>();

            EyouSoft.BLL.CompanyStructure.CompanyCustomStand bllCom = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand();

            int kkk = 0;

            listcus        = bllCom.GetList(100, 1, ref kkk, CurrentUserCompanyID);
            info.AreaId    = model.AreaId;
            info.Attachs   = null;
            info.CompanyId = CurrentUserCompanyID;

            EyouSoft.Model.TourStructure.TourCreateRuleInfo rule = new EyouSoft.Model.TourStructure.TourCreateRuleInfo();
            rule.Cycle = null;
            rule.SDate = null;
            rule.Rule  = EyouSoft.Model.EnumType.TourStructure.CreateTourRule.日期;
            IList <EyouSoft.Model.TourStructure.TourChildrenInfo> childlist = new List <EyouSoft.Model.TourStructure.TourChildrenInfo>();

            string[] childteamnumber = EyouSoft.Common.Utils.GetFormValue("hidToursNumbers").Split(',');
            for (int i = 0; i < childteamnumber.Length; i++)
            {
                EyouSoft.Model.TourStructure.TourChildrenInfo cinfo = new EyouSoft.Model.TourStructure.TourChildrenInfo();
                cinfo.LDate    = EyouSoft.Common.Utils.GetDateTime(childteamnumber[i].Split('{')[0]);
                cinfo.TourCode = childteamnumber[i].Split('}')[1];
                childlist.Add(cinfo);
            }

            info.Childrens = childlist;

            info.LTraffic   = Txt_StartTraffic.Value;
            info.OperatorId = SiteUserInfo.ID;   //用户ID

            info.PlanPeopleNumber = EyouSoft.Common.Utils.GetInt(Txt_PreControlNumber.Value);

            info.Coordinator = new EyouSoft.Model.TourStructure.TourCoordinatorInfo();
            info.Coordinator.CoordinatorId = Utils.GetInt(Utils.GetFormValue("sel_oprator"));

            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> pricelist = new List <EyouSoft.Model.TourStructure.TourPriceStandardInfo>();

            for (int k = 0; k < Utils.GetFormValues("ddl_price").Length; k++)
            {
                EyouSoft.Model.TourStructure.TourPriceStandardInfo price = new EyouSoft.Model.TourStructure.TourPriceStandardInfo();
                price.StandardId   = Utils.GetInt(Utils.GetFormValues("ddl_price")[k].Split('|')[0]);
                price.StandardName = Utils.GetFormValues("ddl_price")[k].Split('|')[1];
                IList <EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo> listLevels = new List <EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo>();


                string[] crPrice = Utils.GetFormValues("txt_cr_price");

                for (int i = 0; i < kkk; i++)
                {
                    EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo level = new EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo();
                    level.AdultPrice    = Utils.GetDecimal(Utils.GetFormValues("txt_cr_price")[i + kkk * k]);
                    level.ChildrenPrice = Utils.GetDecimal(Utils.GetFormValues("txt_rt_price")[i + kkk * k]);
                    level.LevelType     = EyouSoft.Model.EnumType.CompanyStructure.CustomLevType.其他;
                    level.LevelName     = Utils.GetFormValues("hd_cusStandName")[i];
                    level.LevelId       = Utils.GetInt(Utils.GetFormValues("hd_cusStandId")[i]);
                    listLevels.Add(level);
                }
                price.CustomerLevels = listLevels;
                pricelist.Add(price);
            }
            info.PriceStandards = pricelist;
            info.RouteId        = Utils.GetInt(EyouSoft.Common.Utils.GetQueryStringValue("ID"));
            info.RouteName      = model.RouteName;
            info.RTraffic       = Txt_EndTraffic.Value;
            info.Status         = EyouSoft.Model.EnumType.TourStructure.TourStatus.正在收客;

            info.TicketStatus = EyouSoft.Model.EnumType.PlanStructure.TicketState.None;

            model         = rout.GetRouteInfo(info.RouteId);
            info.TourDays = model.RouteDays;

            info.TourType = EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划;
            if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal)
            {
                info.ReleaseType    = model.ReleaseType;
                info.TourNormalInfo = model.RouteNormalInfo;
            }
            else
            {
                info.ReleaseType   = model.ReleaseType;
                info.TourQuickInfo = model.RouteQuickInfo;
            }

            if (tour.InsertTourInfo(info) > 0)
            {
                Response.Write("<script>alert('添加成功!');window.parent.location.href=window.parent.location.href;</script>");
            }
            else
            {
                Response.Write("<script>alert('添加失败!');window.parent.location.href=window.parent.location.href;</script>");
            }
        }
Example #4
0
        protected bool IsStartState = true; //当前账户是否是停用状态
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.AccountDaylist.Items.Clear();
                string[] intarry = new string[32];
                for (int i = 0; i < 32; i++)
                {
                    if (i == 0)
                    {
                        intarry[0] = "请选择";
                    }
                    else
                    {
                        intarry[i] = (i).ToString();
                    }
                }
                if (intarry != null && intarry.Length > 0)
                {
                    this.AccountDaylist.DataSource = intarry;
                    this.AccountDaylist.DataBind();
                }
            }
            #region 设置公司ID初始化省份城市列表
            ucProvince1.CompanyId = CurrentUserCompanyID;
            ucProvince1.IsFav     = true;
            ucCity1.CompanyId     = CurrentUserCompanyID;
            ucCity1.IsFav         = true;
            #endregion

            EyouSoft.BLL.CompanyStructure.Customer       custBll   = new EyouSoft.BLL.CompanyStructure.Customer(); //客户资料bll
            EyouSoft.Model.CompanyStructure.CustomerInfo custModel = null;                                         //客户资料实体
            string method = Utils.GetFormValue("hidMethod");                                                       //当前操作
            int    custId = Utils.GetInt(Utils.GetQueryStringValue("custId"));                                     //客户Id
            string type   = Utils.GetQueryStringValue("type");
            if (type == "show")
            {
                isshow = true;
            }
            EyouSoft.BLL.CompanyStructure.CompanyUser user = new EyouSoft.BLL.CompanyStructure.CompanyUser();
            if (method == "save")
            {
                #region 保存客户资料
                custModel                 = new EyouSoft.Model.CompanyStructure.CustomerInfo();
                custModel.Name            = Utils.InputText(txtCompany.Value);                                                                                 //单位名称
                custModel.Licence         = Utils.InputText(txtLicense.Value);                                                                                 //许可证号
                custModel.Adress          = Utils.InputText(txtAddress.Value);                                                                                 //地址
                custModel.PostalCode      = Utils.InputText(txtPostalCode.Value);                                                                              //邮编
                custModel.BankAccount     = Utils.InputText(txtBankCode.Value);                                                                                //银行账号
                custModel.PreDeposit      = Utils.GetDecimal(Utils.InputText(txtBeforeMoney.Value));                                                           //预存款
                custModel.MaxDebts        = Utils.GetDecimal(Utils.InputText(txtArrears.Value));                                                               //最高欠款
                custModel.CommissionType  = (EyouSoft.Model.EnumType.CompanyStructure.CommissionType)Utils.GetInt(Utils.InputText(rdiBackType.SelectedValue)); //反佣类型
                custModel.CommissionCount = Utils.GetDecimal(Utils.InputText(txtBackMoney.Value));                                                             //反佣金额
                custModel.CustomerLev     = Utils.GetInt(Utils.GetFormValue(selCustLevel.UniqueID));                                                           //客户等级

                custModel.JieSuanType        = (EyouSoft.Model.EnumType.CompanyStructure.KHJieSuanType)Utils.GetInt(ddl_checkType.SelectedValue);
                custModel.IsRequiredTourCode = rad_IsShowGroupNo.SelectedValue == "true" ? true : false;

                //ddl_checkType
                //结算日期
                if (Utils.GetFormValue("AccountTypeRadio") == "1")
                {
                    custModel.AccountDayType = EyouSoft.Model.EnumType.CompanyStructure.AccountDayType.Month;
                    custModel.AccountDay     = Utils.GetInt(Utils.GetFormValue(AccountDaylist.UniqueID));
                }
                else
                {
                    custModel.AccountDayType = EyouSoft.Model.EnumType.CompanyStructure.AccountDayType.Week;
                    custModel.AccountDay     = Utils.GetInt(Utils.GetFormValue("checkDay"));
                }

                custModel.AccountWay   = Utils.InputText(Utils.GetFormValue(AccountType.UniqueID)); //结算方式
                custModel.ContactName  = Utils.InputText(txtMainContact.Value);                     //主要联系人
                custModel.Phone        = Utils.InputText(txtMainTel.Value);                         //电话
                custModel.Mobile       = Utils.InputText(txtMainMobile.Value);                      //手机
                custModel.Fax          = Utils.InputText(txtMainFax.Value);                         //传真
                custModel.Remark       = Utils.InputText(txtRemark.Value);                          //备注
                custModel.ProviceId    = this.ucProvince1.ProvinceId;
                custModel.CityId       = this.ucCity1.CityId;
                custModel.ProvinceName = Utils.GetFormValue("pName");
                if (custModel.ProvinceName == "请选择")
                {
                    custModel.ProvinceName = "";
                }
                custModel.CityName = Utils.GetFormValue("cName");
                if (custModel.CityName == "请选择")
                {
                    custModel.CityName = "";
                }
                custModel.CompanyId = CurrentUserCompanyID;
                custModel.SaleId    = Utils.GetInt(Utils.GetFormValue(selDutySaler.UniqueID));
                custModel.Saler     = Utils.GetFormValue("hidSaler");
                custModel.IssueTime = DateTime.Now;
                custModel.IsEnable  = true;
                custModel.IsDelete  = false;

                custModel.BrandId = Utils.GetInt(Utils.GetFormValue(selBrand.UniqueID));
                string   showMess     = "数据保存成功!";
                string[] contactId    = Utils.GetFormValues("contactId");
                string[] custName     = Utils.GetFormValues("txtContact");                                           //姓名
                string[] custSex      = Utils.GetFormValues("selSex");                                               //性别
                string[] custDepart   = Utils.GetFormValues("txtDepart");                                            //部门
                string[] custBirth    = Utils.GetFormValues("txtBirth");                                             //生日
                string[] custDuty     = Utils.GetFormValues("txtDuty");                                              //职务
                string[] custMobile   = Utils.GetFormValues("txtMobile");                                            //手机
                string[] custTel      = Utils.GetFormValues("txtTel");                                               //电话
                string[] cusFax       = Utils.GetFormValues("txtFax");                                               //传真
                string[] custQQ       = Utils.GetFormValues("txtQQ");                                                //QQ
                string[] custEmail    = Utils.GetFormValues("txtEmail");                                             //用户邮箱
                string[] custUserName = Utils.GetFormValues("txtUserName");                                          //用户名
                string[] custUserId   = Utils.GetFormValues("userId");                                               //用户ID
                string[] custPwd      = Utils.GetFormValues("txtPwd");                                               //密码
                string[] custPwdSure  = Utils.GetFormValues("txtPwdSure");                                           //确认密码
                string[] splitStr     = new string[] { "|," };
                string[] custAreaId   = Utils.GetFormValue("custHidArea").Split(splitStr, StringSplitOptions.None);  //线路区域
                string[] custAreaName = Utils.GetFormValue("txtRouteArea").Split(splitStr, StringSplitOptions.None); //线路区域
                IList <EyouSoft.Model.CompanyStructure.CustomerContactInfo> custList = new List <EyouSoft.Model.CompanyStructure.CustomerContactInfo>();
                StringBuilder repartUserName = new StringBuilder();
                for (int i = 0, len = custName.Length; i < len; i++)
                {
                    if (i == 0 && string.IsNullOrEmpty(custName[i]) || custName[i] == "")
                    {
                        continue;
                    }
                    if (String.IsNullOrEmpty(custName[i]))
                    {
                        MessageBox.ShowAndRedirect(this, "请填写完整姓名!", this.Request.Url.ToString());
                        break;
                    }
                    if (custUserId[i] == "0")
                    {
                        if (user.IsExists(0, custUserName[i], CurrentUserCompanyID))
                        {
                            repartUserName.AppendFormat("{0},", custUserName[i]);
                            //continue;
                        }
                    }
                    EyouSoft.Model.CompanyStructure.CustomerContactInfo custInfo = new EyouSoft.Model.CompanyStructure.CustomerContactInfo();
                    custInfo.BirthDay   = Utils.GetDateTime(custBirth[i], DateTime.Now);
                    custInfo.Department = custDepart[i];
                    custInfo.IsDelete   = "0";
                    custInfo.Email      = string.Empty;
                    custInfo.Job        = custDuty[i];
                    custInfo.Mobile     = custMobile[i];
                    custInfo.Tel        = custTel[i];
                    custInfo.Fax        = cusFax[i];
                    custInfo.ID         = Utils.GetInt(contactId[i]);
                    custInfo.Name       = custName[i];
                    custInfo.qq         = custQQ[i];
                    custInfo.Sex        = custSex[i];
                    custModel.IssueTime = DateTime.Now;
                    if (!user.IsExists(Utils.GetInt(custUserId[i]), custUserName[i], CurrentUserCompanyID) || Utils.GetInt(custUserId[i]) != 0)
                    {
                        custInfo.UserAccount              = new EyouSoft.Model.CompanyStructure.UserAccount();
                        custInfo.UserAccount.CompanyId    = CurrentUserCompanyID;
                        custInfo.UserAccount.UserName     = custUserName[i];
                        custInfo.UserAccount.UserAreaList = new List <EyouSoft.Model.CompanyStructure.UserArea>();
                        string areaIds   = custAreaId[i].Trim('|');
                        string areaNames = custAreaName[i].Trim('|');
                        custInfo.AreaIds   = areaIds;
                        custInfo.AreaNames = areaNames;
                        custInfo.UserAccount.PassWordInfo = new EyouSoft.Model.CompanyStructure.PassWord {
                            NoEncryptPassword = custPwd[i]
                        };
                    }
                    custList.Add(custInfo);
                }
                custModel.CustomerContactList = custList;
                string strRepeat = repartUserName.ToString().TrimEnd(',');

                bool result    = false;
                int  resultInt = 0;
                if (custId != 0)
                {
                    //修改
                    custModel.Id = custId;
                    resultInt    = custBll.UpdateCustomer(custModel);
                    result       = resultInt == 1 || resultInt == 9;
                    var      splitStr2 = new string[] { "," };
                    string[] delIds    = Utils.GetFormValue("delIds").Split(splitStr2, StringSplitOptions.RemoveEmptyEntries);
                    if (delIds.Length > 0)
                    {
                        result = custBll.DeleteCustomerContacter(delIds);
                    }
                }
                else
                {
                    //添加
                    resultInt = custBll.AddCustomer(custModel);
                    result    = resultInt == 1 || resultInt == 9;
                }
                if (!result)
                {
                    showMess = "数据保存失败";
                }
                else
                {
                    if (strRepeat != "")
                    {
                        showMess = strRepeat + "账户已经存在将不会添加!";
                    }
                }
                Utils.ShowMsgAndCloseBoxy(showMess, Utils.GetQueryStringValue("iframeId"), true);
                //MessageBox.ResponseScript(this, string.Format(";alert('{0}');window.parent.location='/CRM/customerinfos/CustomerList.aspx';window.parent.Boxy.getIframeDialog('{1}').hide()", showMess, Utils.GetQueryStringValue("iframeId")));
                #endregion
            }
            else
            {
                #region 初始化加载客户资料
                EyouSoft.BLL.CompanyStructure.CompanyBrand brandBll = new EyouSoft.BLL.CompanyStructure.CompanyBrand();
                int recordCount = 0;
                //初始化绑定品牌列表
                IList <EyouSoft.Model.CompanyStructure.CompanyBrand> listB = brandBll.GetList(100000, 1, ref recordCount, CurrentUserCompanyID);
                selBrand.DataTextField  = "BrandName";
                selBrand.DataValueField = "Id";
                selBrand.DataSource     = listB;
                selBrand.DataBind();
                selBrand.Items.Insert(0, new ListItem("请选择", ""));
                //初始化绑定客户等级列表
                EyouSoft.BLL.CompanyStructure.CompanyCustomStand    customStandBll = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand();//初始化custbll
                IList <EyouSoft.Model.CompanyStructure.CustomStand> list           = customStandBll.GetList(100000, 1, ref recordCount, CurrentUserCompanyID);
                selCustLevel.DataTextField  = "CustomStandName";
                selCustLevel.DataValueField = "Id";
                selCustLevel.DataSource     = list;
                selCustLevel.DataBind();
                selCustLevel.Items.Insert(0, new ListItem("请选择", ""));
                //初始化绑定部门员工列表
                EyouSoft.BLL.CompanyStructure.CompanyUser           userBll  = new EyouSoft.BLL.CompanyStructure.CompanyUser();
                IList <EyouSoft.Model.CompanyStructure.CompanyUser> userList = userBll.GetCompanyUser(CurrentUserCompanyID);
                if (userList != null && userList.Count > 0)
                {
                    foreach (EyouSoft.Model.CompanyStructure.CompanyUser userItem in userList)
                    {
                        selDutySaler.Items.Add(new ListItem(userItem.PersonInfo.ContactName, userItem.ID.ToString()));
                    }
                }
                selDutySaler.Items.Insert(0, new ListItem("请选择", ""));
                //判断是否有分配账号权限(隐藏或显示分配账号按钮)
                if (CheckGrant(global::Common.Enum.TravelPermission.客户关系管理_客户资料_分配帐号))
                {
                    hasAccountPermit = true;
                }
                if (custId != 0)
                {
                    //初始化数据获取客户资料实体
                    custModel = custBll.GetCustomerModel(custId);
                    if (custModel != null)
                    {
                        IsStartState              = custModel.IsEnable;
                        txtCompany.Value          = custModel.Name;                             //单位名称
                        txtLicense.Value          = custModel.Licence;                          //许可证号
                        txtAddress.Value          = custModel.Adress;                           //地址
                        txtPostalCode.Value       = custModel.PostalCode;                       //邮编
                        txtBankCode.Value         = custModel.BankAccount;                      //银行账号
                        txtBeforeMoney.Value      = custModel.PreDeposit.ToString("F2");        //预存款
                        txtArrears.Value          = custModel.MaxDebts.ToString("F2");          //最高欠款
                        rdiBackType.SelectedValue = ((int)custModel.CommissionType).ToString(); //反佣类型
                        txtBackMoney.Value        = custModel.CommissionCount.ToString("F2");   //反佣金额
                        selCustLevel.Value        = custModel.CustomerLev.ToString();           //客户等级


                        ddl_checkType.SelectedValue     = ((int)custModel.JieSuanType).ToString();
                        rad_IsShowGroupNo.SelectedValue = (bool)custModel.IsRequiredTourCode ? "true" : "false";

                        //结算日期 按周
                        if (custModel.AccountDayType == EyouSoft.Model.EnumType.CompanyStructure.AccountDayType.Week)
                        {
                            this.AccountTypeRadio1.Checked = false;
                            this.AccountTypeRadio2.Checked = true;
                            this.AccountDaylist.Attributes.Add("disabled", "disabled");
                            if (custModel.AccountDay != 0)
                            {
                                switch (custModel.AccountDay)
                                {
                                case 1:
                                    this.checkDay1.Checked = true;
                                    break;

                                case 2:
                                    this.checkDay1.Checked = false;
                                    this.checkDay2.Checked = true;
                                    break;

                                case 3:
                                    this.checkDay1.Checked = false;
                                    this.checkDay3.Checked = true;
                                    break;

                                case 4:
                                    this.checkDay1.Checked = false;
                                    this.checkDay4.Checked = true;
                                    break;

                                case 5:
                                    this.checkDay1.Checked = false;
                                    this.checkDay5.Checked = true;
                                    break;

                                case 6:
                                    this.checkDay1.Checked = false;
                                    this.checkDay6.Checked = true;
                                    break;

                                case 7:
                                    this.checkDay1.Checked = false;
                                    this.checkDay7.Checked = true;
                                    break;
                                }
                            }
                        }//按每月X几
                        else
                        {
                            this.AccountTypeRadio1.Checked = true;
                            this.AccountTypeRadio2.Checked = false;
                            this.checkDay1.Attributes.Add("disabled", "disabled"); this.checkDay3.Attributes.Add("disabled", "disabled");
                            this.checkDay2.Attributes.Add("disabled", "disabled"); this.checkDay4.Attributes.Add("disabled", "disabled");
                            this.checkDay5.Attributes.Add("disabled", "disabled"); this.checkDay6.Attributes.Add("disabled", "disabled"); this.checkDay7.Attributes.Add("disabled", "disabled");
                            if (custModel.AccountDay != 0)
                            {
                                this.AccountDaylist.Items.FindByValue(custModel.AccountDay.ToString()).Selected = true;
                            }
                        }

                        //结算方式
                        this.AccountType.Value = custModel.AccountWay;
                        txtMainContact.Value   = custModel.ContactName;        //主要联系人
                        txtMainTel.Value       = custModel.Phone;              //电话
                        txtMainMobile.Value    = custModel.Mobile;             //手机
                        txtMainFax.Value       = custModel.Fax;                //传真
                        txtRemark.Value        = custModel.Remark;             //备注
                        selBrand.Value         = custModel.BrandId.ToString(); //品牌
                        selDutySaler.Value     = custModel.SaleId.ToString();  //责任销售

                        ucProvince1.ProvinceId = custModel.ProviceId;          //省份
                        ucCity1.CityId         = custModel.CityId;             //城市
                        ucCity1.ProvinceId     = custModel.ProviceId;
                        //获取联系人集合
                        IList <EyouSoft.Model.CompanyStructure.CustomerContactInfo> custList = custModel.CustomerContactList;
                        if (custList != null && custList.Count > 0)
                        {
                            GetContactHtml(custList);
                        }
                        //如果有修改权限则显示保存按钮
                        if (CheckGrant(global::Common.Enum.TravelPermission.客户关系管理_客户资料_修改客户))
                        {
                            HasPermit = true;
                        }
                    }
                }
                else
                {   //如果有新增权限则显示保存按钮
                    if (CheckGrant(global::Common.Enum.TravelPermission.客户关系管理_客户资料_新增客户))
                    {
                        HasPermit = true;
                    }
                }
                #endregion
            }
        }