コード例 #1
0
    private void BindData()
    {
        FNA_ClientPaymentInfo m = new FNA_ClientPaymentInfoBLL((int)ViewState["ID"]).Model;

        UploadFile1.RelateID = (int)ViewState["ID"];
        UploadFile1.BindGrid();
        UC_DetailView1.BindData(m);

        if (m.ApproveFlag == 1)
        {
            UC_DetailView1.SetControlsEnable(false);
            bt_Save.Visible       = false;
            bt_Approve.Visible    = false;
            UploadFile1.CanDelete = false;
        }
        else
        {
            btn_CanclePass.Visible = false;
        }
        DropDownList ddl_PayType = UC_DetailView1.FindControl("FNA_ClientPaymentInfo_PayType") == null ? null : (DropDownList)UC_DetailView1.FindControl("FNA_ClientPaymentInfo_PayType");

        if (ddl_PayType != null)
        {
            ddl_PayType_SelectedIndexChanged(ddl_PayType, null);
        }
    }
コード例 #2
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        FNA_StaffSalary_ParamBLL bll = ViewState["ID"] != null ? new FNA_StaffSalary_ParamBLL((int)ViewState["ID"]) : new FNA_StaffSalary_ParamBLL();

        UC_DetailView1.GetData(bll.Model);
        if (bll.Model.Position == 1)
        {
            MessageBox.Show(this, "请选择职位");
            return;
        }
        if (ViewState["ID"] != null)
        {
            bll.Update();
        }
        else
        {
            if (FNA_StaffSalary_ParamBLL.GetModelList("Position=" + bll.Model.Position.ToString()).Count > 0)
            {
                MessageBox.Show(this, "对不起,该职位的绩效参数已维护,请勿重复!");
                return;
            }
            bll.Add();
        }
        UC_DetailView1.BindData(new FNA_StaffSalary_Param());
        ViewState["ID"] = null;
        BindGrid();
    }
コード例 #3
0
 private void BindData()
 {
     if (new UD_WebPageBLL((Guid)ViewState["ID"]).Model != null)
     {
         UC_DetailView1.BindData(new UD_WebPageBLL((Guid)ViewState["ID"]).Model);
     }
 }
コード例 #4
0
    private void BindData()
    {
        CM_KPI m = new CM_KPIBLL((int)ViewState["ID"]).Model;

        UC_DetailView1.BindData(m);

        if (m.ApproveFlag == 1)
        {
            bt_OK.Visible      = false;
            bt_Approve.Visible = false;
            bt_Delete.Visible  = false;
            UC_DetailView1.SetControlsEnable(false);
        }
        else
        {
            //#region 增加计算合计得分按钮
            //Label lb_TotalScore = (Label)UC_DetailView1.FindControl("CM_KPI_TotalScore");
            //Button bt_Compute = new Button();
            //bt_Compute.ID = "bt_Compute";
            //bt_Compute.Text = "计算总分";
            //bt_Compute.Click += new EventHandler(bt_Compute_Click);
            //lb_TotalScore.Parent.Controls.Add(bt_Compute);
            //#endregion
        }
    }
コード例 #5
0
    private void BindData()
    {
        SVM_ClassifyForcastBLL bll = new SVM_ClassifyForcastBLL((int)ViewState["ForcastID"]);

        ViewState["ClientID"] = bll.Model.Client;
        ViewState["Month"]    = bll.Model.AccountMonth;
        CM_Client c = new CM_ClientBLL((int)ViewState["ClientID"]).Model;

        ViewState["ClientType"] = c.ClientType;

        UC_DetailView1.BindData(bll.Model);
        UC_DetailView1.SetControlsEnable(false);
        BindGrid();

        if (bll.Model.ApproveFlag == 1 || bll.Model.TaskID != 0)
        {
            gv_List.SetControlsEnable(false);
            bt_Approve.Visible             = false;
            bt_Save.Visible                = false;
            bt_Del.Visible                 = false;
            bt_DirectApprove.Visible       = false;
            cbx_UpdateAccountMonth.Visible = false;
            bt_Refresh.Visible             = false;
        }
    }
コード例 #6
0
    private void BindData()
    {
        CM_LinkMan _lm = new CM_LinkManBLL((int)ViewState["ID"]).Model;

        UC_DetailView1.BindData(_lm);
        bt_OK.Text      = "修 改";
        bt_OK.ForeColor = System.Drawing.Color.Red;
    }
コード例 #7
0
    private void BindData()
    {
        PM_Promotor m = new PM_PromotorBLL((int)ViewState["PromotorID"]).Model;

        UC_DetailView1.BindData(m);
        gv_list.ConditionString = " Promotor= " + (int)ViewState["PromotorID"];
        gv_list.BindGrid();
    }
コード例 #8
0
    protected void gvList_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
    {
        int id = int.Parse(gvList.DataKeys[e.NewSelectedIndex][0].ToString());

        FNA_StaffSalary_Param m = new FNA_StaffSalary_ParamBLL(id).Model;

        UC_DetailView1.BindData(m);
        ViewState["ID"] = id;
    }
コード例 #9
0
    private void BindData()
    {
        UD_WebPageControl m = new UD_WebPageControlBLL((Guid)ViewState["ID"]).Model;

        ViewState["WebPageID"] = m.WebPageID;

        BindDropDown();

        UC_DetailView1.BindData(m);
    }
コード例 #10
0
    private void BindData()
    {
        SVM_SalesTargetBLL bll = new SVM_SalesTargetBLL((int)ViewState["TargetID"]);

        ViewState["ClientID"] = bll.Model.Client;

        UC_DetailView1.BindData(bll.Model);
        UC_DetailView1.SetControlsEnable(false);
        BindGrid();

        if (bll.Model.ApproveFlag == 1)
        {
            gv_List.SetControlsEnable(false);
            bt_Approve.Visible = false;
            bt_Save.Visible    = false;
            bt_Del.Visible     = false;
        }
    }
コード例 #11
0
    private void BindData()
    {
        FNA_ClientPaymentForcast m = new FNA_ClientPaymentForcastBLL((int)ViewState["ID"]).Model;

        UC_DetailView1.BindData(m);

        if (m.ApproveFlag == 1)
        {
            UC_DetailView1.SetControlsEnable(false);
            bt_Save.Visible    = false;
            bt_Approve.Visible = false;
        }
        else
        {
            UC_DetailView1.SetControlsEnable(true);
            bt_Save.Visible           = true;
            bt_Approve.Visible        = true;
            btn_CancleApprove.Visible = false;
        }
    }
コード例 #12
0
    private void BindData()
    {
        SVM_InventoryBLL bll = new SVM_InventoryBLL((int)ViewState["InventoryID"]);

        ViewState["ClientID"] = bll.Model.Client;
        ViewState["IsCXP"]    = bll.Model["IsCXP"] == "1";

        UC_DetailView1.BindData(bll.Model);
        UC_DetailView1.SetControlsEnable(false);
        BindGrid();

        if (bll.Model.ApproveFlag == 1)
        {
            gv_List.SetControlsEnable(false);

            bt_Approve.Visible    = false;
            bt_Save.Visible       = false;
            bt_Submit.Visible     = false;
            bt_Del.Visible        = false;
            tb_AddProduct.Visible = false;
        }
        else
        {
            bt_Re_Approve.Visible = false;
            bt_Del.Visible        = (int)Session["UserID"] == bll.Model.InsertStaff;

            if (bll.Model["SubmitFlag"] == "1")
            {
                bt_Submit.Visible = false;       //已提交
            }
            else
            {
                bt_Approve.Visible = false;     //未提交
            }
        }
        if (!(bool)ViewState["IsCXP"])
        {
            tb_AddProduct.Visible = false;
        }
    }
コード例 #13
0
    private void BindData()
    {
        SVM_InventoryDifferencesBLL bll = new SVM_InventoryDifferencesBLL((int)ViewState["InventoryID"]);

        ViewState["ClientID"] = bll.Model.Client;
        ViewState["IsCXP"]    = bll.Model["IsCXP"] == "1";

        UC_DetailView1.BindData(bll.Model);
        UC_DetailView1.SetControlsEnable(false);

        #region 根据状态设定界面控件可见属性
        if (bll.Model.ApproveFlag == 1 || bll.Model["SubmitFlag"] == "1")
        {
            gv_List.SetControlsEnable(false);
            cb_OnlyDisplayUnZero.Checked = true;
            bt_Save.Visible       = false;
            bt_Submit.Visible     = false;
            bt_Del.Visible        = false;
            tb_AddProduct.Visible = false;
            bt_Submit.Visible     = false;

            if (bll.Model.ApproveFlag == 1)
            {
                bt_Approve.Visible = false;                                 //未提交
            }
        }
        else
        {
            bt_Del.Visible     = (int)Session["UserID"] == bll.Model.InsertStaff;
            bt_Approve.Visible = false;
        }
        #endregion
        ComputDiffInfo(bll);

        BindGrid();
    }
コード例 #14
0
    private void BindData(PM_PromotorSalary m)
    {
        if (m != null)
        {
            ViewState["PromotorID"]       = m.Promotor;
            ViewState["PromotorSalaryID"] = m.ID;
        }

        #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_Promotor p = new PM_PromotorBLL((int)ViewState["PromotorID"]).Model;
        if (p == null)
        {
            Response.Redirect("PM_PromotorDetail.aspx");
        }
        if (m == null)
        {
            m              = new PM_PromotorSalary();
            m.Promotor     = (int)ViewState["PromotorID"];
            m.State        = 1;
            m.InsertStaff  = (int)Session["UserID"];
            m.RTManageCost = (decimal)ViewState["RTManageCost"];
            if (p["Classfiy"] == "1" || p["Classfiy"] == "2")
            {
                m.SeniorityPayMode = 1;
            }
        }
        if (p["State"] == "2")
        {
            bt_Add.Visible = false;
        }

        UC_DetailView1.BindData(m);
        chk_arrivetarget.Checked = m["ISArriveTarget"] == "1";
        UC_DetailView1.SetControlsEnable(m.State == 1);
        bt_OK.Enabled = m.State == 1;

        if (m.ID != 0)
        {
            bt_Delete.Enabled  = m.State == 1;
            bt_Submit.Enabled  = m.State == 1;
            bt_Approve.Enabled = m.State == 1;
        }
        else
        {
            bt_Submit.Enabled  = false;
            bt_Approve.Enabled = false;
            bt_Delete.Enabled  = false;
        }
        if (m.BasePayMode != 4 && m.BasePayMode != 5)
        {
            setdisabledfloatingcontorl(false);
        }


        //导购为新入职、或离职状态
        if (p.ApproveFlag == 2)
        {
            bt_Submit.Visible = false;
        }
        //if (p.Dimission == 2) bt_Add.Visible = false;

        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 < 2)
        {
            #region 兼职导购的限定
            try
            {
                if (ddl_BasePayMode != null)
                {
                    if (p["Classfiy"] != "1" && p["Classfiy"] != "2")   //非专职、非流导,认为是兼职导购
                    {
                        //兼职
                        //ddl_BasePayMode.Items[0].Enabled = false;
                        //ddl_BasePayMode.Items[1].Enabled = false;
                        //ddl_BasePayMode.Items[2].Enabled = false;
                        SetControlsEnable(false);
                        ddl_BasePayMode.SelectedValue = "3";
                        ddl_BasePayMode.Enabled       = false;
                    }
                    else
                    {
                        Addr_OrganizeCityBLL _bll   = new Addr_OrganizeCityBLL(p.OrganizeCity);
                        string[]             city3s = Addr_OrganizeCityParamBLL.GetValueByType(1, 19).Split(new char[] { ',', ',', ';', ';' });
                        int city3ID = TreeTableBLL.GetSuperIDByLevel("MCS_SYS.dbo.Addr_OrganizeCity", p.OrganizeCity, ConfigHelper.GetConfigInt("OrganizePartCity-CityLevel"));

                        if (city3s.Contains(city3ID.ToString()))
                        {
                            ddl_BasePayMode.Items.Remove(new ListItem("浮动底薪(非华南)", "4"));
                        }
                        else
                        {
                            decimal AvgSales = 0, BaseFeeRate = 0;
                            int     SalaryDelayDays = ConfigHelper.GetConfigInt("SalaryDelayDays");
                            ddl_SalesType.Enabled = false;
                            new PM_PromotorSalaryBLL().GetFloatingInfo(p.ID, AC_AccountMonthBLL.GetMonthByDate(DateTime.Now.AddDays(-SalaryDelayDays)) - 1, out AvgSales, out BaseFeeRate);

                            if (AvgSales == 0 && BaseFeeRate == 0)//首两月不是固定底薪,不能选择浮动底薪
                            {
                                ddl_BasePayMode.Items.Remove(new ListItem("浮动底薪(非华南)", "4"));
                            }
                            else
                            {
                                ViewState["AvgSales"]    = AvgSales;
                                ViewState["BaseFeeRate"] = BaseFeeRate;
                            }

                            ddl_BasePayMode.Items.Remove(new ListItem("浮动底薪(华南)", "5"));
                        }
                        ddl_BasePayMode.Items.Remove(new ListItem("兼职底薪", "3"));
                        //50岁只能选择商保(5)或自购(8)
                        DateTime Birthday;
                        if (DateTime.TryParse(p["Birthday"], out Birthday) && Birthday.AddYears(50) < DateTime.Now)
                        {
                            foreach (ListItem item in ddl_InsuranceMode.Items)
                            {
                                if (item.Value != "5" && item.Value != "8" && item.Value != "0")
                                {
                                    item.Enabled = false;
                                }
                            }
                        }
                        //专职或流导
                        //ddl_BasePayMode.Items[3].Enabled = false;
                    }
                }
            }
            catch { }
            #endregion

            ddl_BasePayMode_SelectedIndexChanged(null, null);
            ddl_BasePaySubsidyMode_SelectedIndexChanged(null, null);
            ddl_InsuranceMode_SelectedIndexChanged(null, null);
            ddl_MinimumWageMode_SelectedIndexChanged(null, null);
        }
        BindGrid();
    }
コード例 #15
0
    private void BindData()
    {
        PM_Promotor m = new PM_PromotorBLL((int)ViewState["PromotorID"]).Model;

        UC_DetailView1.BindData(m);
        gv_list.ConditionString = " Promotor= " + (int)ViewState["PromotorID"];
        gv_list.BindGrid();

        //验证身份证号码
        txt_BankName.Enabled = m["BankType"] == "3";

        if (m.ApproveFlag == 1)
        {
            bt_Approve.Visible = false;
            if (m.Dimission == 1)
            {
                TextBox txt_EndWorkDate = (TextBox)UC_DetailView1.FindControl("PM_Promotor_EndWorkDate");
                if (txt_EndWorkDate != null)
                {
                    txt_EndWorkDate.Enabled = false;
                }

                bt_AddApply.Visible = false;
                #region 导购兼职/专职转换
                int classfiy = 0;
                int.TryParse(m["Classfiy"], out classfiy);
                if (classfiy == 0)
                {
                    bt_ChangeClassify.Visible = false;
                }
                else if (classfiy == 1 || classfiy == 2)
                {
                    bt_ChangeClassify.Text    = "转为兼职";
                    bt_ChangeClassify.Visible = true;
                }
                else
                {
                    bt_ChangeClassify.Text    = "转为专职/流动";
                    bt_ChangeClassify.Visible = true;
                }
                bt_ChangeClassify.OnClientClick = "PopPMClassify_Approve(" + ViewState["PromotorID"].ToString() + ")";
                #endregion
            }
            Header.Attributes["WebPageSubCode"] = "Modify";
            //TextBox txt_BeginWorkDate = (TextBox)UC_DetailView1.FindControl("PM_Promotor_BeginWorkDate");

            //临时开放修改功能
            //if (txt_BeginWorkDate != null && m.Dimission==1) txt_BeginWorkDate.Enabled = false;

            //有些离职日期会填写错误,更新为权限修改 12.11.21
            //if (m.Dimission == 2)
            //{
            //    TextBox txt_EndWorkDate = (TextBox)UC_DetailView1.FindControl("PM_Promotor_EndWorkDate");
            //    if (txt_EndWorkDate != null) txt_EndWorkDate.Enabled = false;
            //}
            string[] allowdays = Addr_OrganizeCityParamBLL.GetValueByType(1, 9).Replace(" ", "").Split(new char[] { ',', ',', ';', ';' });
            if (allowdays.Contains(DateTime.Now.Day.ToString()))
            {
                bt_ChangeClassify.Enabled = false;
                bt_ChangeClassify.ToolTip = "导购工资生成期间不能互转";
            }
        }

        if (m["State"] == "2")
        {
            //审批中
            bt_AddApply.Visible       = false;
            bt_OK.Visible             = false;
            bt_TaskDetail.Visible     = true;
            bt_ChangeClassify.Enabled = false;
            bt_ChangeClassify.ToolTip = "该导购有未完成的流程,请待流程完成后,再做调整!";
        }
        bt_OK.Text      = "保 存";
        bt_OK.ForeColor = System.Drawing.Color.Red;


        if (m["Classfiy"] != "")
        {
            int budget = PM_PromotorNumberLimitBLL.CheckOverBudget(m.OrganizeCity, int.Parse(m["Classfiy"]));
            if (budget == 0)
            {
                lb_OverBudgetInfo.Text = "导购员数量已等于预定的预算人数,请注意!";
            }
            else if (budget < 0)
            {
                lb_OverBudgetInfo.Text = "导购员数量已超过预定的预算人数 " + (0 - budget).ToString() + "人,请注意!";
            }
        }


        if (m["IDCode"].Length == 18 && !Tools.DoVerifyIDCode(m["IDCode"]))
        {
            lb_OverBudgetInfo.Text += "         注意:该导购员身份证号码错误!";
        }

        ddl_Classify_SelectedIndexChanged(null, null);
    }
コード例 #16
0
    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);
        }
    }
コード例 #17
0
 private void BindData()
 {
     UC_DetailView1.BindData(new UD_TableListBLL((Guid)ViewState["TableID"]).Model);
 }