private void BindData(int classfiy)
    {
        PM_Promotor p = new PM_PromotorBLL((int)ViewState["PromotorID"]).Model;

        #region 获取当前导购标准薪资、保底薪资、导购管理费
        if ((int)ViewState["PromotorID"] > 0)
        {
            decimal basepay = 0, minumumwage = 0, rtmanagecost = 0;
            new PM_PromotorBLL((int)ViewState["PromotorID"]).GetStdPay(out basepay, out minumumwage, out rtmanagecost);
            ViewState["BasePay"]      = basepay;
            ViewState["MinumumWage"]  = minumumwage;
            ViewState["RTManageCost"] = rtmanagecost;
        }
        #endregion

        PM_PromotorSalary m = new PM_PromotorSalary();
        m.Promotor              = (int)ViewState["PromotorID"];
        m.State                 = 1;
        m.InsertStaff           = (int)Session["UserID"];
        m.RTManageCost          = (decimal)ViewState["RTManageCost"];
        ddl_BasePayMode.Enabled = false;
        if (classfiy == 1 || classfiy == 2)
        {
            m.BasePayMode = 3;
        }
        else
        {
            m.SeniorityPayMode            = 1;
            ddl_BankType.Items[3].Enabled = false;

            #region 抓取固定底薪标准
            decimal basepay = (decimal)ViewState["BasePay"];
            m.BasePay = basepay;
            #endregion
            Addr_OrganizeCityBLL _bll = new Addr_OrganizeCityBLL(p.OrganizeCity);
            if (_bll.IsChildOrganizeCity(7))//判断是否为华南区
            {
                ddl_BasePayMode.Items.Remove(new ListItem("浮动底薪(非华南)", "4"));
                ddl_BasePayMode.Items.Remove(new ListItem("兼职底薪", "3"));
                ddl_BasePayMode.Enabled = true;
                ddl_SalesType.Enabled   = true;
                txt_BaseFeeRate.Enabled = true;
            }
            else
            {
                m.BasePayMode = 1;
            }
        }
        UC_DetailView1.BindData(m);

        if (m.RTManageCost > 0 && (decimal)ViewState["RTManageCost"] == m.RTManageCost)
        {
            TextBox tbx = (TextBox)UC_DetailView1.FindControl("PM_PromotorSalary_RTManageCost");
            if (tbx != null)
            {
                tbx.Enabled = false;
            }
        }
        if (m.State < 3)
        {
            #region 兼职导购的限定
            try
            {
                if (classfiy != 1 && classfiy != 2)   //非专职、非流导,认为是兼职导购
                {
                    DateTime Birthday;
                    if (DateTime.TryParse(p["Birthday"], out Birthday) && Birthday.AddYears(49) < DateTime.Now)
                    {
                        foreach (ListItem item in ddl_InsuranceMode.Items)
                        {
                            if (item.Value != "5" && item.Value != "8" && item.Value != "0")
                            {
                                item.Enabled = false;
                            }
                        }
                    }
                    SetControlsEnable(true);
                }
                else
                {
                    SetControlsEnable(false);
                }
            }
            catch { }
            #endregion


            ddl_BasePaySubsidyMode_SelectedIndexChanged(null, null);
            ddl_InsuranceMode_SelectedIndexChanged(null, null);
            ddl_MinimumWageMode_SelectedIndexChanged(null, null);
            ddl_BankType_SelectedIndexChanged(null, null);
        }
    }
    private void BindData(int classfiy)
    {
        PM_Promotor p = new PM_PromotorBLL((int)ViewState["PromotorID"]).Model;
        #region 获取当前导购标准薪资、保底薪资、导购管理费
        if ((int)ViewState["PromotorID"] > 0)
        {
            decimal basepay = 0, minumumwage = 0, rtmanagecost = 0;
            new PM_PromotorBLL((int)ViewState["PromotorID"]).GetStdPay(out basepay, out minumumwage, out rtmanagecost);
            ViewState["BasePay"] = basepay;
            ViewState["MinumumWage"] = minumumwage;
            ViewState["RTManageCost"] = rtmanagecost;
        }
        #endregion

        PM_PromotorSalary m = new PM_PromotorSalary();
        m.Promotor = (int)ViewState["PromotorID"];
        m.State = 1;
        m.InsertStaff = (int)Session["UserID"];
        m.RTManageCost = (decimal)ViewState["RTManageCost"];
        ddl_BasePayMode.Enabled = false;
        if (classfiy == 1 || classfiy == 2)
        {
            m.BasePayMode = 3;
        }
        else
        {

            m.SeniorityPayMode = 1;
            ddl_BankType.Items[3].Enabled = false;

            #region 抓取固定底薪标准
            decimal basepay = (decimal)ViewState["BasePay"];
            m.BasePay = basepay;
            #endregion
            Addr_OrganizeCityBLL _bll = new Addr_OrganizeCityBLL(p.OrganizeCity);
            if (_bll.IsChildOrganizeCity(7))//判断是否为华南区
            {
                ddl_BasePayMode.Items.Remove(new ListItem("浮动底薪(非华南)", "4"));
                ddl_BasePayMode.Items.Remove(new ListItem("兼职底薪", "3"));
                ddl_BasePayMode.Enabled = true;
                ddl_SalesType.Enabled = true;
                txt_BaseFeeRate.Enabled = true;

            }
            else
            {
                m.BasePayMode = 1;
            }

        }
        UC_DetailView1.BindData(m);

        if (m.RTManageCost > 0 && (decimal)ViewState["RTManageCost"] == m.RTManageCost)
        {
            TextBox tbx = (TextBox)UC_DetailView1.FindControl("PM_PromotorSalary_RTManageCost");
            if (tbx != null) tbx.Enabled = false;
        }
        if (m.State < 3)
        {
            #region 兼职导购的限定
            try
            {
                if (classfiy != 1 && classfiy != 2)   //非专职、非流导,认为是兼职导购
                {
                    DateTime Birthday;
                    if (DateTime.TryParse(p["Birthday"], out Birthday) && Birthday.AddYears(49) < DateTime.Now)
                    {
                        foreach (ListItem item in ddl_InsuranceMode.Items)
                        {
                            if (item.Value != "5" && item.Value != "8" && item.Value != "0")
                            {
                                item.Enabled = false;
                            }
                        }
                    }
                    SetControlsEnable(true);
                }
                else
                {
                    SetControlsEnable(false);

                }

            }
            catch { }
            #endregion

            ddl_BasePaySubsidyMode_SelectedIndexChanged(null, null);
            ddl_InsuranceMode_SelectedIndexChanged(null, null);
            ddl_MinimumWageMode_SelectedIndexChanged(null, null);
            ddl_BankType_SelectedIndexChanged(null, null);
        }
    }