private void BindPosition()
 {
     listAccount.Items.Clear();
     tr_Position.DataSource = Org_PositionBLL.GetAllPostion();
     tr_Position.DataBind();
     tr_Position.SelectValue = "1";
 }
    private void BindDropDown()
    {
        Org_StaffBLL staff = new Org_StaffBLL((int)Session["UserID"]);

        tr_Position.DataSource = Org_PositionBLL.GetAllPostion();

        #region 如果非总部职位,其只能选择自己职位及以下职位
        Org_Position p = new Org_PositionBLL(staff.Model.Position).Model;
        if (p != null && p.IsHeadOffice != "Y" && p.Remark != "OfficeHR")
        {
            //tr_Position.RootValue = staff.Model.Position.ToString();// p.SuperID.ToString();
            tr_Position.RootValue   = p.SuperID.ToString();
            tr_Position.SelectValue = staff.Model.Position.ToString();
        }
        else
        {
            tr_Position.RootValue = "1";
            //tr_Position.SelectValue = "1";
        }
        tr_Position.SelectValue = tr_Position.RootValue;
        #endregion
        ddl_ApproveFlag.DataSource = DictionaryBLL.GetDicCollections("PUB_ApproveFlag");
        ddl_ApproveFlag.DataBind();
        ddl_ApproveFlag.Items.Insert(0, new ListItem("请选择", "0"));
    }
Пример #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            tbx_begin.Text = DateTime.Now.AddMonths(-3).ToShortDateString();
            tbx_end.Text   = DateTime.Now.ToShortDateString();

            #region 绑定用户可管辖的片区
            Org_StaffBLL staff = new Org_StaffBLL((int)Session["UserID"]);
            tr_OrganizeCity.DataSource = staff.GetStaffOrganizeCity();

            if (tr_OrganizeCity.DataSource.Select("ID = 1").Length > 0)
            {
                tr_OrganizeCity.RootValue   = "0";
                tr_OrganizeCity.SelectValue = "1";
            }
            else
            {
                tr_OrganizeCity.RootValue   = new Addr_OrganizeCityBLL(staff.Model.OrganizeCity).Model.SuperID.ToString();
                tr_OrganizeCity.SelectValue = staff.Model.OrganizeCity.ToString();
            }
            #endregion
            tr_Position.DataSource = Org_PositionBLL.GetAllPostion();

            BindData();
        }
    }
Пример #4
0
    private void BindDropDown()
    {
        Org_StaffBLL staff = new Org_StaffBLL((int)Session["UserID"]);

        tr_OrganizeCity.DataSource = staff.GetStaffOrganizeCity();

        if (tr_OrganizeCity.DataSource.Select("ID = 1").Length > 0)
        {
            tr_OrganizeCity.RootValue   = "0";
            tr_OrganizeCity.SelectValue = "1";
        }
        else
        {
            tr_OrganizeCity.RootValue   = new Addr_OrganizeCityBLL(staff.Model.OrganizeCity).Model.SuperID.ToString();
            tr_OrganizeCity.SelectValue = staff.Model.OrganizeCity.ToString();
        }

        ddl_CityLevel.DataSource = DictionaryBLL.GetDicCollections("Addr_OrganizeCityLevel");
        ddl_CityLevel.DataBind();
        ddl_CityLevel.Items.Insert(0, new ListItem("请选择", "0"));
        ddl_CityLevel.SelectedValue = "4";

        tr_Position.DataSource  = Org_PositionBLL.GetAllPostion();
        tr_Position.SelectValue = staff.Model.Position.ToString();
    }
Пример #5
0
    private void BindDropDown()
    {
        //SuperPosition
        tr_SuperPosition.DataSource = Org_PositionBLL.GetAllPostion();

        //Depart
        ddl_Department.DataSource = DictionaryBLL.GetDicCollections("PUB_Department");
        ddl_Department.DataBind();
        ddl_Department.Items.Insert(0, new ListItem("请选择...", "0"));
    }
    private void BindDropDown()
    {
        ddl_Type.DataSource = DictionaryBLL.GetDicCollections("EWF_Role_Type");
        ddl_Type.DataBind();
        ddl_Type.Items.Insert(0, new ListItem("请选择...", "0"));

        tr_SuperPosition.DataSource = Org_PositionBLL.GetAllPostion();
        tr_SuperPosition.DataBind();
        tr_SuperPosition.SelectValue = "0";
    }
    private void BindPosition()
    {
        //ddl_Position.DataSource = Org_PositionBLL.GetAllPostion();
        //ddl_Position.DataBind();
        //ddl_Position.Items.Insert(0, new ListItem("请选择员工职位", "0"));

        tr_Position.DataSource = Org_PositionBLL.GetAllPostion();
        tr_Position.DataBind();
        tr_Position.SelectedValue = "1";
        //tr_Position.SelectValue = "1";
    }
Пример #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            tr_Position.DataSource = Org_PositionBLL.GetAllPostion();
            tr_Position.DataBind();
            tr_Position.SelectValue = "0";

            BindTree(tr_Role.Nodes);
        }
    }
Пример #9
0
    private void BindPublic()
    {
        lbRemainStaff.Items.Clear();
        tr_Position.DataSource = Org_PositionBLL.GetAllPostion();
        tr_Position.DataBind();
        tr_Position.SelectValue = "1";
        BBS_BoardUserMemberBLL userMemberbll = new BBS_BoardUserMemberBLL((int)ViewState["BoardID"]);

        if (userMemberbll != null && userMemberbll._GetModelList(" Board=" + (int)ViewState["BoardID"]).Count > 0)
        {
            lbBoardMasterList.Items.Clear();
            foreach (BBS_BoardUserMember user in userMemberbll._GetModelList(" Board=" + (int)ViewState["BoardID"] + " and Role = 1"))
            {
                lbBoardMasterList.Items.Add(new ListItem(user.UserName + "[" + UserBLL.GetStaffByUsername(user.UserName).RealName + "]", user.UserName));
            }
        }
    }
    private void BindDropDown()
    {
        Org_StaffBLL staff = new Org_StaffBLL((int)Session["UserID"]);

        tr_Position.DataSource = Org_PositionBLL.GetAllPostion();

        #region 如果非总部职位,其只能选择自己职位及以下职位
        Org_Position p = new Org_PositionBLL(staff.Model.Position).Model;
        if (p != null && p.IsHeadOffice != "Y" && p.Remark != "OfficeHR")
        {
            tr_Position.RootValue   = p.SuperID.ToString();
            tr_Position.SelectValue = staff.Model.Position.ToString();
        }
        else
        {
            tr_Position.RootValue = "1";
        }
        tr_Position.SelectValue = tr_Position.RootValue;
        #endregion
    }
Пример #11
0
    private void BindDropDown()
    {
        Org_StaffBLL staff = new Org_StaffBLL((int)Session["UserID"], true);

        tr_OrganizeCity.DataSource = staff.GetStaffOrganizeCity();

        if (tr_OrganizeCity.DataSource.Select("ID = 1").Length > 0)
        {
            tr_OrganizeCity.RootValue   = "0";
            tr_OrganizeCity.SelectValue = "1";
        }
        else
        {
            tr_OrganizeCity.RootValue   = new Addr_OrganizeCityBLL(staff.Model.OrganizeCity).Model.SuperID.ToString();
            tr_OrganizeCity.SelectValue = staff.Model.OrganizeCity.ToString();
        }

        ddl_JournalType.DataSource = DictionaryBLL.GetDicCollections("OA_JournalType");
        ddl_JournalType.DataBind();
        ddl_JournalType.Items.Insert(0, new ListItem("请选择...", "0"));

        #region 绑定职位
        tr_Position.DataSource = Org_PositionBLL.GetAllPostion();
        tr_Position.DataBind();

        #region 如果非总部职位,其只能选择自己职位及以下职位
        if (Right_Assign_BLL.GetAccessRight(Session["UserName"].ToString(), 22, "ViewAllStaffJN"))
        {
            //有【查看所有员工工作日志】权限
            tr_Position.RootValue   = "0";
            tr_Position.SelectValue = "0";
        }
        else
        {
            tr_Position.RootValue   = staff.Model.Position.ToString();
            tr_Position.SelectValue = staff.Model.Position.ToString();
        }
        #endregion

        #endregion
    }
Пример #12
0
    private void BindDropDown()
    {
        Org_StaffBLL staff = new Org_StaffBLL((int)Session["UserID"]);

        #region 绑定职位
        tr_ToPosition.DataSource = Org_PositionBLL.GetAllPostion();

        #region 如果非总部职位,其只能选择自己职位及以下职位
        Org_Position p = new Org_PositionBLL(staff.Model.Position).Model;
        if (p != null && p.IsHeadOffice != "Y")
        {
            tr_ToPosition.RootValue   = p.SuperID.ToString();
            tr_ToPosition.SelectValue = staff.Model.Position.ToString();
        }
        else
        {
            tr_ToPosition.RootValue   = "0";
            tr_ToPosition.SelectValue = "1";
        }

        #endregion

        tr_ToOrganizeCity.DataBind();
        #endregion

        #region 绑定管理片区
        tr_ToOrganizeCity.DataSource = staff.GetStaffOrganizeCity();

        if (tr_ToOrganizeCity.DataSource.Select("ID = 1").Length > 0)
        {
            tr_ToOrganizeCity.RootValue   = "0";
            tr_ToOrganizeCity.SelectValue = "1";
        }
        else
        {
            tr_ToOrganizeCity.RootValue   = new Addr_OrganizeCityBLL(staff.Model.OrganizeCity).Model.SuperID.ToString();
            tr_ToOrganizeCity.SelectValue = staff.Model.OrganizeCity.ToString();
        }
        #endregion
    }
Пример #13
0
    private void BindDropDown()
    {
        ddl_Position.DataSource = Org_PositionBLL.GetAllPostion();
        ddl_Position.DataBind();

        if (Request.QueryString["StaffID"] != null)
        {
            int       staffid = int.Parse(Request.QueryString["StaffID"]);
            Org_Staff staff   = new Org_StaffBLL(staffid).Model;
            if (staff != null)
            {
                ddl_Position.SelectValue = staff.Position.ToString();
                ddl_Staff.DataSource     = Org_StaffBLL.GetStaffList("Position=" + staff.Position.ToString());
                ddl_Staff.DataBind();
                ddl_Staff.SelectedValue = staff.ID.ToString();
            }
        }
        else
        {
            ddl_Staff.DataSource = Org_StaffBLL.GetStaffList("Position=" + ddl_Position.SelectValue);
            ddl_Staff.DataBind();
        }
    }
    private void BindDropDown()
    {
        Org_StaffBLL staff = new Org_StaffBLL((int)Session["UserID"], true);

        tr_OrganizeCity.DataSource = staff.GetStaffOrganizeCity();

        if (tr_OrganizeCity.DataSource.Select("ID = 1").Length > 0)
        {
            tr_OrganizeCity.RootValue   = "0";
            tr_OrganizeCity.SelectValue = "1";
        }
        else
        {
            tr_OrganizeCity.RootValue   = new Addr_OrganizeCityBLL(staff.Model.OrganizeCity).Model.SuperID.ToString();
            tr_OrganizeCity.SelectValue = staff.Model.OrganizeCity.ToString();
        }

        #region 绑定职位
        tr_Position.DataSource = Org_PositionBLL.GetAllPostion();
        tr_Position.DataBind();

        #region 如果非总部职位,其只能选择自己职位及以下职位
        if (Right_Assign_BLL.GetAccessRight(Session["UserName"].ToString(), 22, "ViewAllStaffPlan"))
        {
            //有【查看所有员工工作计划】权限
            tr_Position.RootValue   = "0";
            tr_Position.SelectValue = "0";
        }
        else
        {
            tr_Position.RootValue   = staff.Model.Position.ToString();
            tr_Position.SelectValue = staff.Model.Position.ToString();
        }
        #endregion

        #endregion
    }
 private void BindDropDown()
 {
     tr_Position.DataSource = Org_PositionBLL.GetAllPostion();
     tr_Position.DataBind();
 }
 private void BindPosition()
 {
     ddl_Position.DataSource = Org_PositionBLL.GetAllPostion();
     ddl_Position.DataBind();
     ddl_Position.Items.Insert(0, new ListItem("请选择员工职位", "0"));
 }