Exemplo n.º 1
0
    /// <summary>
    /// 初始化领导名称
    /// </summary>
    private void InitLeader()
    {
        string CompanyCode            = BPMHelp.GetCompanyCodeByDeptID(StartDeptId);
        string GeneralDeptCode        = BPMHelp.GetDeptIDByOtherIDAndName(StartDeptId, "综合管理部");
        BFPmsUserRoleDepartment bfurd = new BFPmsUserRoleDepartment();
        DataTable dtDeptManager       = bfurd.GetSelectRoleUser(StartDeptId, "部门负责人");
        DataTable dtPresident         = bfurd.GetSelectRoleUser(CompanyCode, "总经理");
        DataTable dtZHDeptManager     = bfurd.GetSelectRoleUser(GeneralDeptCode, "部门负责人");

        if (dtDeptManager.Rows.Count != 0)
        {
            lbDeptManager.Text = "(" + dtDeptManager.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
        else
        {
            lbDeptManager.Text = "";
        }
        if (dtPresident.Rows.Count != 0)
        {
            lbPresident.Text = "(" + dtPresident.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
        if (dtZHDeptManager.Rows.Count != 0)
        {
            lbZHDeptManager.Text = "(" + dtZHDeptManager.Rows[0]["EmployeeName"].ToString() + ")审核";
        }
    }
Exemplo n.º 2
0
    public override void SetParams()
    {
        base.SetParams();
        Countersign1.Submit();

        //FlowParams.SetParams("leaders", @"founder\zhangweixing,founder\zybpmadmin");//分管领导
        //return;
        string        counterSignDeptIds = Countersign1.Result;
        StringBuilder leaders            = new StringBuilder();

        if (!string.IsNullOrEmpty(counterSignDeptIds))
        {
            string[] deptIds = counterSignDeptIds.Split(',');
            foreach (var item in deptIds)
            {
                BFPmsUserRoleDepartment bfurd = new BFPmsUserRoleDepartment();
                DataTable dt = bfurd.GetSelectRoleUser(item, "主管领导");
                foreach (DataRow dr in dt.Rows)
                {
                    leaders.AppendFormat(@"Founder\{0},", dt.Rows[0]["LoginName"].ToString());
                }
            }
        }

        FlowParams.SetParams("leaders", leaders.ToString().Trim(','));//分管领导
    }
Exemplo n.º 3
0
    /// <summary>
    /// 初始化领导名称
    /// </summary>
    private void InitLeader()
    {
        BFPmsUserRoleDepartment bfurd = new BFPmsUserRoleDepartment();
        DataTable dtDeptManager       = bfurd.GetSelectRoleUser(StartDeptId, "部门负责人");
        DataTable dtHRDeptManager     = bfurd.GetSelectRoleUser(HRDeptCode, "部门负责人");
        DataTable dtDirector          = bfurd.GetSelectRoleUser(StartDeptId, "主管副总裁");
        DataTable dtPresident         = bfurd.GetSelectRoleUser(PKURGICode, "董事长");

        if (dtDeptManager.Rows.Count != 0)
        {
            lbDeptManager2.Text = "(" + dtDeptManager.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
        if (dtHRDeptManager.Rows.Count != 0)
        {
            lbHRDeptManager2.Text = "(" + dtHRDeptManager.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
        if (dtDirector.Rows.Count != 0)
        {
            lbDirector2.Text = "(" + dtDirector.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
        if (dtPresident.Rows.Count != 0)
        {
            lbPresident2.Text = "(" + dtPresident.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
    }
Exemplo n.º 4
0
    /// <summary>
    /// 得到集团采购管理部的成员
    /// </summary>
    /// <param name="code"></param>
    /// <returns></returns>
    private static IList <VEmployeeAndAdditionalInfo> GetUserListByDeptCode(string code)
    {
        BFPmsUserRoleDepartment            bfurd = new BFPmsUserRoleDepartment();
        IList <VEmployeeAndAdditionalInfo> ds    = new List <VEmployeeAndAdditionalInfo>();

        DataTable dtUsers = bfurd.GetSelectRoleUser(code, "招采流程收文人");

        if (dtUsers == null || dtUsers.Rows.Count <= 0)
        {
            ds = bfurd.GetNotSelectRoleUser("0");
            ds = ds.Where(x => x.DepartCode == code).ToList();
        }
        else
        {
            foreach (DataRow item in dtUsers.Rows)
            {
                ds.Add(new VEmployeeAndAdditionalInfo()
                {
                    LoginName    = item["LoginName"].ToString(),
                    DepartName   = item["DepartName"].ToString(),
                    EmployeeName = item["EmployeeName"].ToString(),
                    Email        = item["LoginName"].ToString() + "@jtmail.founder.com",
                    EmployeeCode = item["EmployeeCode"].ToString()
                });
            }
        }
        return(ds);
    }
Exemplo n.º 5
0
    /// <summary>
    /// 初始化经办部门
    /// </summary>
    private void InitStartDeptment()
    {
        if (!IsPostBack)
        {
            Department deptInfo           = new Pkurg.PWorld.Services.DepartmentService().GetByDepartCode(_BPMContext.CurrentUser.MainDeptId);
            BFPmsUserRoleDepartment bfurd = new BFPmsUserRoleDepartment();
            Pkurg.PWorld.Entities.TList <Department> deptInfo2 = bfurd.GetDeptListByEmployeeCodeAndRoleName(_BPMContext.CurrentPWordUser.EmployeeCode, "部门成员");

            //初始化发起人所属“部门成员”的部门,若为空则初始化发起人所在部门
            foreach (Department DeptItem in deptInfo2)
            {
                ddlDepartName.Items.Add(new ListItem()
                {
                    Text  = DeptItem.Remark,
                    Value = DeptItem.DepartCode
                });
            }
            if (deptInfo2.Count == 0)
            {
                ddlDepartName.Items.Add(new ListItem()
                {
                    Text  = deptInfo.Remark,
                    Value = deptInfo.DepartCode
                });
            }
        }
    }
Exemplo n.º 6
0
    private void InitLeader()
    {
        BFPmsUserRoleDepartment bfurd = new BFPmsUserRoleDepartment();
        DataTable dtDeptManager       = bfurd.GetSelectRoleUser(StartDeptId, "部门负责人");
        DataTable dtDirector          = bfurd.GetSelectRoleUser(StartDeptId, "主管副总裁");
        DataTable dtGeneralManager    = bfurd.GetSelectRoleUser(BCCode, "总裁");
        DataTable dtPresident         = bfurd.GetSelectRoleUser(GroupCode, "总裁");
        DataTable dtGroupOffice       = bfurd.GetSelectRoleUser(GroupOfficeCode, "部门负责人");
        DataTable dtSealManager       = bfurd.GetSelectRoleUser(BCCode, "公章管理员");

        if (dtDeptManager.Rows.Count != 0)
        {
            lbDeptManager.Text = "(" + dtDeptManager.Rows[0]["EmployeeName"].ToString() + ")审核";
        }
        if (dtDirector.Rows.Count != 0)
        {
            lbDirector.Text = "(" + dtDirector.Rows[0]["EmployeeName"].ToString() + ")审核";
        }
        if (dtGeneralManager.Rows.Count != 0)
        {
            lbGeneralManager.Text = "(" + dtGeneralManager.Rows[0]["EmployeeName"].ToString() + ")审核";
        }
        if (dtPresident.Rows.Count != 0)
        {
            lbPresident.Text = "(" + dtPresident.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
        if (dtGroupOffice.Rows.Count != 0)
        {
            lbGroupOffice.Text = "(" + dtGroupOffice.Rows[0]["EmployeeName"].ToString() + ")复核";
        }
        if (dtSealManager.Rows.Count != 0)
        {
            lbSealManager.Text = "(" + dtSealManager.Rows[0]["EmployeeName"].ToString() + ")盖章";
        }
    }
    /// <summary>
    /// 初始化领导
    /// </summary>
    private void InitLeader()
    {
        string CompanyCode            = BPMHelp.GetCompanyCodeByDeptID(StartDeptId);
        BFPmsUserRoleDepartment bfurd = new BFPmsUserRoleDepartment();
        DataTable dtDeptManager       = bfurd.GetSelectRoleUser(StartDeptId, "部门负责人");
        DataTable dtEVP       = bfurd.GetSelectRoleUser(CompanyCode, "常务副总裁");
        DataTable dtCFO       = bfurd.GetSelectRoleUser(CompanyCode, "主管财务领导");
        DataTable dtPresident = bfurd.GetSelectRoleUser(CompanyCode, "总裁");
        DataTable dtChairman  = bfurd.GetSelectRoleUser(CompanyCode, "董事长");

        if (dtDeptManager.Rows.Count != 0)
        {
            lbDeptManager.Text = "(" + dtDeptManager.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
        if (dtCFO.Rows.Count != 0)
        {
            lbCFO.Text = "(" + dtCFO.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
        else
        {
            lbCFO.Text = "尚未配置";
        }
        if (dtEVP.Rows.Count != 0)
        {
            lbEVP.Text = "(" + dtEVP.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
        if (dtPresident.Rows.Count != 0)
        {
            lbPresident.Text = "(" + dtPresident.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
        if (dtChairman.Rows.Count != 0)
        {
            lbChairman.Text = "(" + dtChairman.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
    }
    private void InitLeader()
    {
        BFPmsUserRoleDepartment bfurd = new BFPmsUserRoleDepartment();
        DataTable dtDeptManager       = bfurd.GetSelectRoleUser(StartDeptId, "部门负责人");
        DataTable dtPresident         = bfurd.GetSelectRoleUser(GroupCode, "总裁");
        DataTable dtChairman          = bfurd.GetSelectRoleUser(GroupCode, "董事长");

        if (dtDeptManager.Rows.Count != 0)
        {
            lbDeptManager.Text = "(" + dtDeptManager.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
        if (dtPresident.Rows.Count != 0)
        {
            lbPresident.Text = "(" + dtPresident.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
        if (dtChairman.Rows.Count != 0)
        {
            lbChairman.Text = "(" + dtChairman.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
        if (!StartDeptId.Contains(GroupCode))
        {
            trDept.Visible     = false;
            cbAP.Checked       = false;
            cbVP.Checked       = false;
            cbChairman.Checked = false;
        }
        else
        {
            trDept.Visible = true;
        }
    }
Exemplo n.º 9
0
    /// <summary>
    /// 初始化发起部门
    /// </summary>
    private void InitStartDeptment()
    {
        if (!IsPostBack)
        {
            Department deptInfo           = new Pkurg.PWorld.Services.DepartmentService().GetByDepartCode(_BPMContext.CurrentUser.MainDeptId);
            BFPmsUserRoleDepartment bfurd = new BFPmsUserRoleDepartment();
            Pkurg.PWorld.Entities.TList <Department> deptInfo2 = bfurd.GetDeptListByEmployeeCodeAndRoleName(_BPMContext.CurrentPWordUser.EmployeeCode, "部门成员");

            ddlDepartName.Items.Add(new ListItem()
            {
                Text  = deptInfo.Remark,
                Value = deptInfo.DepartCode
            });
            //初始化发起人所属“部门成员”的部门
            //首先初始化发起人所在部门,然后在加上发起人所属“部门成员”的部门,需要去重
            //解决了一个系统的bug[有个人,他的所在部门A“部门成员”为空,他是部门B的“部门成员“,部门A没有会签部门,部门B有,
            //初始化会签部门时,默认初始化他的所在部门A,发起部门初始化成部门B,这样导致他发流程没有会签部门可以勾选]
            foreach (Department DeptItem in deptInfo2)
            {
                if (deptInfo.DepartCode != DeptItem.DepartCode)
                {
                    ListItem item = new ListItem()
                    {
                        Text  = DeptItem.Remark,
                        Value = DeptItem.DepartCode
                    };
                    ddlDepartName.Items.Add(item);
                }
            }
        }
    }
Exemplo n.º 10
0
    protected void InitDepartName()
    {
        Department deptInfo           = new Pkurg.PWorld.Services.DepartmentService().GetByDepartCode(_BPMContext.CurrentUser.MainDeptId);
        BFPmsUserRoleDepartment bfurd = new BFPmsUserRoleDepartment();

        Pkurg.PWorld.Entities.TList <Department> deptInfo2 = bfurd.GetDeptListByEmployeeCodeAndRoleName(_BPMContext.CurrentPWordUser.EmployeeCode, "部门成员");

        ddlDepartName.Items.Add(new ListItem()
        {
            Text  = deptInfo.Remark,
            Value = deptInfo.DepartCode
        });

        foreach (Department deptItem in deptInfo2)
        {
            if (deptInfo.DepartCode != deptItem.DepartCode)
            {
                ListItem item = new ListItem()
                {
                    Text  = deptItem.Remark,
                    Value = deptItem.DepartCode
                };
                ddlDepartName.Items.Add(item);
            }
        }
    }
Exemplo n.º 11
0
    private void Refresh(string userName, string loginName)
    {
        BFPmsUserRoleDepartment            ur = new BFPmsUserRoleDepartment();
        IList <VEmployeeAndAdditionalInfo> ds = ur.GetNotSelectRoleUser("0");

        string deptIdString = Request["deptid"];

        if (string.IsNullOrEmpty(deptIdString) || hd_SelectType.Value == "1")
        {
            //加签
        }
        else
        {
            //部门内处理
            BFPmsUserRoleDepartment bfurd = new BFPmsUserRoleDepartment();
            DataTable dtUsers             = bfurd.GetSelectRoleUser(deptIdString, "部门成员");


            if (dtUsers != null && dtUsers.Rows.Count > 0)
            {
                ds = new List <VEmployeeAndAdditionalInfo>();
                foreach (DataRow item in dtUsers.Rows)
                {
                    ds.Add(new VEmployeeAndAdditionalInfo()
                    {
                        LoginName    = item["LoginName"].ToString(),
                        DepartName   = item["DepartName"].ToString(),
                        EmployeeName = item["EmployeeName"].ToString()
                    });
                }
                if (dtUsers.Rows.Count <= 0)
                {
                    ds = ds.Where(x => x.DepartCode == deptIdString).ToList();
                }
            }
            else
            {
                ds = ds.Where(x => x.DepartCode == deptIdString).ToList();
            }

            //gvData.DataSource = dtUsers;
            //gvData.DataBind();
            //return;
        }

        if (!string.IsNullOrEmpty(userName))
        {
            ds = ds.Where(x => x.EmployeeName.Contains(userName)).ToList();
        }
        if (!string.IsNullOrEmpty(loginName))
        {
            ds = ds.Where(x => x.LoginName.Contains(loginName)).ToList();
        }
        gvData.DataSource = ds;
        gvData.DataBind();
    }
Exemplo n.º 12
0
    public string GetUserLoginName(string roleName)
    {
        StringBuilder content = new StringBuilder();
        DataTable     dt      = new BFPmsUserRoleDepartment().GetSelectRoleUser(_BPMContext.CurrentUser.MainDeptId, roleName);

        foreach (DataRow dr in dt.Rows)
        {
            content.AppendFormat(@"Founder\{0},", dt.Rows[0]["LoginName"].ToString());
        }
        return(content.ToString().Trim(','));
    }
Exemplo n.º 13
0
    /// <summary>
    /// 初始化总办会成员复选框和董事长勾选框
    /// </summary>
    private void InitCheckBoxList()
    {
        BFPmsUserRoleDepartment bfurd = new BFPmsUserRoleDepartment();
        DataTable dtLeaders           = bfurd.GetSelectRoleUser(PKURGICode, "总办会成员");
        string    strLeaders          = GetRoleUsers(PKURGICode, "总办会成员");

        foreach (DataRow user in dtLeaders.Rows)
        {
            ListItem li = new ListItem();
            li.Value = "K2:Founder\\" + user["LoginName"].ToString();
            li.Text  = user["EmployeeName"].ToString();
            if (!cblTopLeaders.Items.Contains(li))
            {
                cblTopLeaders.Items.Add(li);
            }
        }

        if (!string.IsNullOrEmpty(Request.QueryString["id"]))
        {
            XmlDocument        xmldoc       = new XmlDocument();
            SystemDispatchInfo formDataInfo = SystemDispatch.GetSystemDispatchInfo(FormId);
            if (!string.IsNullOrEmpty(formDataInfo.LeadersSelected))
            {
                xmldoc.LoadXml(formDataInfo.LeadersSelected);
            }

            XmlNode NodeLeaders = xmldoc.SelectSingleNode("//TopLeaders");
            if (NodeLeaders != null && NodeLeaders.Attributes["ID"].Value.Length > 0)
            {
                foreach (string UserGuid in NodeLeaders.Attributes["ID"].Value.Split(','))
                {
                    for (int i = 0; i < cblTopLeaders.Items.Count; i++)
                    {
                        if (cblTopLeaders.Items[i].Value == UserGuid)
                        {
                            cblTopLeaders.Items[i].Selected = true;
                        }
                    }
                }
            }
            XmlNode NodeChairman = xmldoc.SelectSingleNode("//Chairman");
            if (NodeChairman != null && NodeChairman.Attributes["ID"].Value != "noapprovers")
            {
                cbChairman.Checked = true;
            }
        }
        else
        {
            for (int i = 0; i < cblTopLeaders.Items.Count; i++)
            {
                cblTopLeaders.Items[i].Selected = true;
            }
        }
    }
Exemplo n.º 14
0
    private void InitLeader()
    {
        string CompanyCode            = BPMHelp.GetCompanyCodeByDeptID(StartDeptId);
        BFPmsUserRoleDepartment bfurd = new BFPmsUserRoleDepartment();
        DataTable dtDeptManager       = bfurd.GetSelectRoleUser(StartDeptId, "部门负责人");
        DataTable dtPresident         = bfurd.GetSelectRoleUser(CompanyCode, "总裁");
        DataTable dtCGDeptManager     = bfurd.GetSelectRoleUser(CGDeptCode, "部门负责人");
        DataTable dtDoorManager       = bfurd.GetSelectRoleUser(CGDeptCode, "入户门审核员");
        DataTable dtPaintManager      = bfurd.GetSelectRoleUser(CGDeptCode, "涂料审核员");
        DataTable dtJJuManager        = bfurd.GetSelectRoleUser(CGDeptCode, "洁具审核员");
        DataTable dtProjectDiretor    = bfurd.GetSelectRoleUser(XMYYDeptCode, "部门副总经理");
        DataTable dtPurchaseDiretor   = bfurd.GetSelectRoleUser(CGDeptCode, "集采复审员");
        DataTable dtGroupLeader       = bfurd.GetSelectRoleUser(CGDeptCode, "主管副总裁");

        if (dtDeptManager.Rows.Count != 0)
        {
            lbDeptManager.Text = "(" + dtDeptManager.Rows[0]["EmployeeName"].ToString() + ")审核";
        }
        if (dtPresident.Rows.Count != 0)
        {
            lbPresident.Text = "(" + dtPresident.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
        if (dtCGDeptManager.Rows.Count != 0)
        {
            lbGroupDeptManager.Text = "(" + dtCGDeptManager.Rows[0]["EmployeeName"].ToString() + ")审核";
        }
        if (dtDoorManager.Rows.Count != 0)
        {
            cbDoorManager.Text = "选择 " + dtDoorManager.Rows[0]["EmployeeName"].ToString() + "(入户门)";
        }
        if (dtPaintManager.Rows.Count != 0)
        {
            cbPaintManager.Text = "选择 " + dtPaintManager.Rows[0]["EmployeeName"].ToString() + "(涂料)";
        }
        if (dtJJuManager.Rows.Count != 0)
        {
            cbJJuManager.Text = "选择 " + dtJJuManager.Rows[0]["EmployeeName"].ToString() + "(洁具)";
        }
        if (dtProjectDiretor.Rows.Count != 0)
        {
            lbProjectDiretor.Text = "(" + dtProjectDiretor.Rows[0]["EmployeeName"].ToString() + ")审核";
        }
        if (dtPurchaseDiretor.Rows.Count != 0)
        {
            lbPurchaseDiretor.Text = "(" + dtPurchaseDiretor.Rows[0]["EmployeeName"].ToString() + ")审核";
        }
        if (dtGroupLeader.Rows.Count != 0)
        {
            lbGroupLeader.Text = "(" + dtGroupLeader.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
    }
Exemplo n.º 15
0
    private void InitLeader()
    {
        BFPmsUserRoleDepartment bfurd = new BFPmsUserRoleDepartment();
        DataTable dtDeptManager       = bfurd.GetSelectRoleUser(StartDeptId, "部门负责人");
        DataTable dtPresident         = bfurd.GetSelectRoleUser(GroupCode, "总裁");

        if (dtDeptManager.Rows.Count != 0)
        {
            lbDeptManager.Text = "(" + dtDeptManager.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
        if (dtPresident.Rows.Count != 0)
        {
            lbPresident.Text = "(" + dtPresident.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
    }
Exemplo n.º 16
0
    private static string GetRoleUsers(string dept, string roleName)
    {
        BFPmsUserRoleDepartment bfurd     = new BFPmsUserRoleDepartment();
        StringBuilder           dataInfos = new StringBuilder();
        DataTable dtDept = bfurd.GetSelectRoleUser(dept, roleName);

        if (dtDept != null && dtDept.Rows.Count != 0)
        {
            foreach (DataRow rowItem in dtDept.Rows)
            {
                dataInfos.AppendFormat("K2:Founder\\{0},", rowItem["LoginName"].ToString());
            }
        }
        return(dataInfos.ToString().Trim(','));
    }
Exemplo n.º 17
0
    /// <summary>
    /// 获取发起部门数据源
    /// 部门名称:Remark
    /// Code:DepartCode
    /// </summary>
    /// <returns></returns>
    protected List <Department> GetStartDeptmentDataSource()
    {
        List <Department>       deptments = new List <Department>();
        Department              deptInfo  = new Pkurg.PWorld.Services.DepartmentService().GetByDepartCode(_BPMContext.CurrentUser.MainDeptId);
        BFPmsUserRoleDepartment bfurd     = new BFPmsUserRoleDepartment();

        Pkurg.PWorld.Entities.TList <Department> deptInfo2 = bfurd.GetDeptListByEmployeeCodeAndRoleName(_BPMContext.CurrentPWordUser.EmployeeCode, "部门成员");
        deptments.AddRange(deptInfo2);
        if (deptInfo2.Exists(x => x.DepartCode == deptInfo.DepartCode))
        {
            deptInfo2.Remove(deptInfo);
        }
        deptments.Insert(0, deptInfo);
        return(deptments);
    }
Exemplo n.º 18
0
    private void Refresh(string userName, string loginName)
    {
        BFPmsUserRoleDepartment            ur = new BFPmsUserRoleDepartment();
        IList <VEmployeeAndAdditionalInfo> ds = ur.GetNotSelectRoleUser("0");

        if (!string.IsNullOrEmpty(userName))
        {
            ds = ds.Where(x => x.EmployeeName.Contains(userName)).ToList();
        }
        if (!string.IsNullOrEmpty(loginName))
        {
            ds = ds.Where(x => x.LoginName.Contains(loginName)).ToList();
        }
        gvData.DataSource = ds;
        gvData.DataBind();
    }
Exemplo n.º 19
0
    /// <summary>
    /// 初始化领导名称
    /// </summary>
    private void InitLeader()
    {
        BFPmsUserRoleDepartment bfurd = new BFPmsUserRoleDepartment();
        DataTable dtHRDeptManager     = bfurd.GetSelectRoleUser(HRDeptCode, "部门负责人");
        DataTable dtPresident         = bfurd.GetSelectRoleUser(PKURGICode, "董事长");
        DataTable dtDeptManagers      = bfurd.GetSelectRoleUser(PKURGICode, "部门总成员");
        DataTable dtDirectors         = bfurd.GetSelectRoleUser(PKURGICode, "总办会成员");

        if (dtHRDeptManager.Rows.Count != 0)
        {
            lbHRDeptManager2.Text = "(" + dtHRDeptManager.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
        if (dtPresident.Rows.Count != 0)
        {
            lbPresident2.Text = "(" + dtPresident.Rows[0]["EmployeeName"].ToString() + ")审批";
        }

        foreach (DataRow user in dtDeptManagers.Rows)
        {
            ListItem li = new ListItem();
            li.Value = "K2:Founder\\" + user["LoginName"].ToString();
            li.Text  = user["EmployeeName"].ToString();
            if (!cblRDeptManager.Items.Contains(li))
            {
                cblRDeptManager.Items.Add(li);
            }
        }

        foreach (DataRow user in dtDirectors.Rows)
        {
            ListItem li = new ListItem();
            li.Value = "K2:Founder\\" + user["LoginName"].ToString();
            li.Text  = user["EmployeeName"].ToString();
            if (!cblDirector.Items.Contains(li))
            {
                cblDirector.Items.Add(li);
            }
        }

        if (!string.IsNullOrEmpty(Request.QueryString["id"]))
        {
            XmlDocument xmldoc = new XmlDocument();
            xmldoc.LoadXml(hfApprovers.Value);
            InitCheckboxlist(xmldoc, "/Leaders/Director", cblDirector);
            InitCheckboxlist(xmldoc, "/Leaders/EDeptManager", cblRDeptManager);
        }
    }
Exemplo n.º 20
0
    protected void InitLeader()
    {
        #region 工作流参数
        //get users by role
        BFEmployee         employee    = new BFEmployee();
        string             currentUser = Page.User.Identity.Name.ToLower().Replace(@"founder\", "");
        EmployeeAdditional employeeadd = employee.GetEmployeeAdditionalByLoginName(currentUser);
        Employee           em          = employee.GetEmployeeByEmployeeCode(employeeadd.EmployeeCode);//get user info

        //get activity destination users
        BFPmsUserRoleDepartment bfurd = new BFPmsUserRoleDepartment();
        DataTable dtDept  = bfurd.GetSelectRoleUser(em.DepartCode, "部门负责人");
        DataTable dtCheck = bfurd.GetSelectRoleUser(em.CompanyCode, "流程审核人");
        DataTable dtlead  = bfurd.GetSelectRoleUser(em.DepartCode, "主管领导");
        DataTable dtCEO   = bfurd.GetSelectRoleUser(em.CompanyCode, "CEO");

        #endregion
    }
Exemplo n.º 21
0
    private void NewNode(XmlDocument xmldoc, XmlElement xmleLeaders, string NodeTemp, string DeptCodeTemp, string RoleNameTemp, bool IsCheck)
    {
        string UsersID   = "";
        string UsersName = "";
        BFPmsUserRoleDepartment bfurd = new BFPmsUserRoleDepartment();
        DataTable dtHRDeptManager     = bfurd.GetSelectRoleUser(DeptCodeTemp, RoleNameTemp);

        foreach (DataRow user in dtHRDeptManager.Rows)
        {
            UsersID   = UsersID + (string.IsNullOrEmpty(UsersID) ? "" : ",") + "K2:Founder\\" + user["LoginName"].ToString();
            UsersName = UsersName + (string.IsNullOrEmpty(UsersName) ? "" : ",") + user["EmployeeName"].ToString();
        }

        XmlElement xmleTemp = xmldoc.CreateElement(NodeTemp);

        xmleLeaders.AppendChild(xmleTemp);
        xmleTemp.SetAttribute("ID", UsersID);
        xmleTemp.SetAttribute("Name", UsersName);
    }
Exemplo n.º 22
0
    protected string SaveSelectedSignLeader()
    {
        XmlDocument xmldoc      = new XmlDocument();
        XmlElement  xmleLeaders = xmldoc.CreateElement("Leaders");

        xmldoc.AppendChild(xmleLeaders);

        //从“相关部门分管领导”到“集团董事长审批”中的步骤的所有参与审判的用户列表
        List <string> ApproverList    = new List <string>();
        string        LeaderTemp      = string.Empty;
        string        FinalLeaderTemp = string.Empty;

        BFEmployee         employee    = new BFEmployee();
        string             currentUser = Page.User.Identity.Name.ToLower().Replace(@"founder\", "");
        EmployeeAdditional employeeadd = employee.GetEmployeeAdditionalByLoginName(currentUser);
        Employee           em          = employee.GetEmployeeByEmployeeCode(employeeadd.EmployeeCode);//get user info

        //get activity destination users
        BFPmsUserRoleDepartment bfurd = new BFPmsUserRoleDepartment();
        DataTable dtDept = bfurd.GetSelectRoleUser(em.DepartCode, "部门负责人");

        //部门负责人
        if (chkDeptManager.Checked)
        {
            XmlElement xmleDeptManager = xmldoc.CreateElement("DeptManager");
            xmleLeaders.AppendChild(xmleDeptManager);

            LeaderTemp = dtDept.Rows[0]["LoginName"].ToString();
            if (LeaderTemp.Length > 0)
            {
                foreach (string L in LeaderTemp.Split(','))
                {
                    if (L != "")
                    {
                        ApproverList.Add(L);
                    }
                }
            }
            xmleDeptManager.SetAttribute("ID", LeaderTemp);
        }
        return(xmleLeaders.OuterXml);
    }
Exemplo n.º 23
0
    private void LoadRelationPerson()
    {
        StringBuilder           showUsers = new StringBuilder();
        BFPmsUserRoleDepartment bfurd     = new BFPmsUserRoleDepartment();

        cbRelatonUsers.Items.Clear();
        if (ddlDepartName.Items.Count == 0)
        {
            //showUsers.Append("没有配置相关角色");
            //cbPayer.Enabled = false;
        }
        else
        {
            string     startDeptId = ddlDepartName.SelectedItem.Value;
            Department deptInfo    = new Pkurg.PWorld.Services.DepartmentService().GetByDepartCode(startDeptId);
            string     CompanyCode = BPMHelp.GetCompanyCodeByDeptID(startDeptId);
            DataTable  dtDept      = bfurd.GetSelectRoleUser(CompanyCode, "付款申请工程师");
            if (dtDept != null && dtDept.Rows.Count != 0)
            {
                foreach (DataRow rowItem in dtDept.Rows)//EmployeeCode
                {
                    //showUsers.AppendFormat("{0},", rowItem["EmployeeName"].ToString());

                    cbRelatonUsers.Items.Add(new ListItem()
                    {
                        Text  = rowItem["EmployeeName"].ToString(),
                        Value = rowItem["LoginName"].ToString()
                    });
                }
                // showUsers.Append("选择相关人员意见");
                //cbPayer.Enabled = true;
                //cbPayer.Text = string.Format("相关人员({0})", showUsers.ToString().Trim(','));
                //return;
            }
            else
            {
                // showUsers.Append("没有配置相关角色");
                // cbPayer.Enabled = false;
            }
        }
        // cbPayer.Text = showUsers.ToString();
    }
Exemplo n.º 24
0
    public string GetCounterSignUsers()
    {
        //return @"founder\zhangweixing,founder\zybpmadmin";
        StringBuilder content = new StringBuilder();

        for (int i = 0; i < chklCountersignDept.Items.Count; i++)
        {
            ListItem item = chklCountersignDept.Items[i];
            if (item.Selected)
            {
                BFPmsUserRoleDepartment bfurd = new BFPmsUserRoleDepartment();
                DataTable dt = bfurd.GetSelectRoleUser(item.Value, "部门负责人");
                foreach (DataRow dr in dt.Rows)
                {
                    content.AppendFormat(@"Founder\{0},", dt.Rows[0]["LoginName"].ToString());
                }
            }
        }
        return(content.ToString().TrimEnd(','));
    }
Exemplo n.º 25
0
    private void InitLeader()
    {
        BFPmsUserRoleDepartment bfurd = new BFPmsUserRoleDepartment();
        DataTable dtDeptManager       = bfurd.GetSelectRoleUser(StartDeptId, "部门负责人");
        DataTable dtPresident         = bfurd.GetSelectRoleUser(GroupCode, "总裁");
        DataTable dtChairman          = bfurd.GetSelectRoleUser(GroupCode, "董事长");
        DataTable dtDutyFreeManager   = bfurd.GetSelectRoleUser(DutyFreeDeptCode, "部门负责人");

        if (dtDeptManager.Rows.Count != 0)
        {
            lbDeptManager.Text = "(" + dtDeptManager.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
        if (dtPresident.Rows.Count != 0)
        {
            lbPresident.Text = "(" + dtPresident.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
        if (dtChairman.Rows.Count != 0)
        {
            lbChairman.Text = "(" + dtChairman.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
        if (dtDutyFreeManager.Rows.Count != 0)
        {
            lbDutyFreeManager.Text = "(" + dtDutyFreeManager.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
        if (StartDeptId.Substring(0, StartDeptId.LastIndexOf('-')) != GroupCode)
        {
            trDept.Visible = false;
        }
        else
        {
            trDept.Visible = true;
        }
        if (StartDeptId.Substring(0, 4) == DutyFreeShopCode)
        {
            trDutyFree.Visible        = true;
            trDutyFreeOpinion.Visible = true;
            cbAP.Checked        = false;
            cbVP.Checked        = false;
            cbPresident.Checked = false;
        }
    }
Exemplo n.º 26
0
    private void InitLeader()
    {
        BFPmsUserRoleDepartment bfurd = new BFPmsUserRoleDepartment();
        string    GroupCode           = System.Configuration.ConfigurationManager.AppSettings["GroupCode"];
        string    startDeptId         = ddlDepartName.SelectedItem.Value;
        DataTable dtDeptleader        = bfurd.GetSelectRoleUser(startDeptId, "部门负责人");
        DataTable dtCEO      = bfurd.GetSelectRoleUser(GroupCode, "总裁");
        DataTable dtChairman = bfurd.GetSelectRoleUser(GroupCode, "董事长");

        if (dtDeptleader.Rows.Count != 0)
        {
            lbDeptleader.Text = "部门负责人(" + dtDeptleader.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
        if (dtCEO.Rows.Count != 0)
        {
            lbCEO.Text = "CEO(" + dtCEO.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
        if (dtChairman.Rows.Count != 0)
        {
            lbChairman.Text = "(" + dtChairman.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
    }
Exemplo n.º 27
0
    protected string SaveSelectedSignLeader()
    {
        XmlDocument xmldoc      = new XmlDocument();
        XmlElement  xmleLeaders = xmldoc.CreateElement("Leaders");

        xmldoc.AppendChild(xmleLeaders);

        //从“相关部门分管领导”到“集团董事长审批”中的步骤的所有参与审批的用户列表
        List <string> ApproverList    = new List <string>();
        string        LeaderTemp      = string.Empty;
        string        FinalLeaderTemp = string.Empty;

        BFEmployee         employee    = new BFEmployee();
        string             currentUser = Page.User.Identity.Name.ToLower().Replace(@"founder\", "");
        EmployeeAdditional employeeadd = employee.GetEmployeeAdditionalByLoginName(currentUser);
        Employee           em          = employee.GetEmployeeByEmployeeCode(employeeadd.EmployeeCode);//get user info

        //get activity destination users
        BFPmsUserRoleDepartment bfurd = new BFPmsUserRoleDepartment();
        DataTable dtDept = bfurd.GetSelectRoleUser(em.DepartCode, "部门负责人");

        return(xmleLeaders.OuterXml);
    }
Exemplo n.º 28
0
    /// <summary>
    /// 初始化领导
    /// </summary>
    private void InitLeader()
    {
        BFPmsUserRoleDepartment bfurd = new BFPmsUserRoleDepartment();
        DataTable dtDeptManager       = bfurd.GetSelectRoleUser(StartDeptId, "部门负责人");
        DataTable dtPresident         = bfurd.GetSelectRoleUser(GroupCode, "总裁");
        DataTable dtChairman          = bfurd.GetSelectRoleUser(GroupCode, "董事长");

        if (dtDeptManager.Rows.Count != 0)
        {
            lbDeptManager.Text = "(" + dtDeptManager.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
        if (dtPresident.Rows.Count != 0)
        {
            lbCEO.Text = "(" + dtPresident.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
        if (dtChairman.Rows.Count != 0)
        {
            lbChairman.Text = "(" + dtChairman.Rows[0]["EmployeeName"].ToString() + ")审批";
        }
        if (StartDeptId.Substring(0, StartDeptId.LastIndexOf('-')) != GroupCode)
        {
            trDept.Visible = false;
        }
    }
Exemplo n.º 29
0
    private void InitCheckBoxList()
    {
        BFPmsUserRoleDepartment bfurd = new BFPmsUserRoleDepartment();
        DataTable dtLeaders           = bfurd.GetSelectRoleUser(GroupCode, "总办会成员");

        foreach (DataRow user in dtLeaders.Rows)
        {
            ListItem li = new ListItem();
            li.Value = "K2:Founder\\" + user["LoginName"].ToString();
            li.Text  = user["EmployeeName"].ToString();
            if (!cblDirectors.Items.Contains(li))
            {
                cblDirectors.Items.Add(li);
            }
        }

        if (!string.IsNullOrEmpty(Request.QueryString["id"]))
        {
            XmlDocument             xmldoc       = new XmlDocument();
            InstructionOfPKURGIInfo formDataInfo = Eitems.Get(FormId);
            if (!string.IsNullOrEmpty(formDataInfo.LeadersSelected))
            {
                xmldoc.LoadXml(formDataInfo.LeadersSelected);
            }

            XmlNode NodeLeaders = xmldoc.SelectSingleNode("//Directors");
            if (NodeLeaders != null && NodeLeaders.Attributes["ID"].Value.Length > 0)
            {
                foreach (string UserGuid in NodeLeaders.Attributes["ID"].Value.Split(','))
                {
                    for (int i = 0; i < cblDirectors.Items.Count; i++)
                    {
                        if (cblDirectors.Items[i].Value == UserGuid)
                        {
                            cblDirectors.Items[i].Selected = true;
                        }
                    }
                }
            }
            XmlNode NodeChairman = xmldoc.SelectSingleNode("//Chairman");
            if (NodeChairman != null && NodeChairman.Attributes["ID"].Value != "noapprovers")
            {
                cbChairman.Checked = true;
            }
            else
            {
                cbChairman.Checked = false;
            }
            //XmlNode NodePresident = xmldoc.SelectSingleNode("//President");
            //if (NodePresident != null && NodePresident.Attributes["ID"].Value != "noapprovers")
            //{
            //    cbPresident.Checked = true;
            //}
            XmlNode NodeVP = xmldoc.SelectSingleNode("//VicePresident");
            if (NodeVP != null && NodeVP.Attributes["ID"].Value != "noapprovers")
            {
                cbVP.Checked = true;
            }
            else
            {
                cbVP.Checked = false;
            }
            XmlNode NodeAP = xmldoc.SelectSingleNode("//AssiPresident");
            if (NodeAP != null && NodeAP.Attributes["ID"].Value != "noapprovers")
            {
                cbAP.Checked = true;
            }
            else
            {
                cbAP.Checked = false;
            }
        }
        else
        {
            for (int i = 0; i < cblDirectors.Items.Count; i++)
            {
                cblDirectors.Items[i].Selected = false;
            }
        }
    }
Exemplo n.º 30
0
    /// <summary>
    /// 初始化CheckBoxList
    /// </summary>
    private void InitCheckBoxList()
    {
        BFPmsUserRoleDepartment bfurd = new BFPmsUserRoleDepartment();
        string    PresidentOfficeCode = BPMHelp.GetDeptIDByOtherIDAndName(StartDeptId, "总办会");
        DataTable dtLeaders           = bfurd.GetSelectRoleUser(PresidentOfficeCode, "部门成员");

        foreach (DataRow user in dtLeaders.Rows)
        {
            ListItem li = new ListItem();
            li.Value = "K2:Founder\\" + user["LoginName"].ToString();
            li.Text  = user["EmployeeName"].ToString();
            if (!cblDirectors.Items.Contains(li))
            {
                cblDirectors.Items.Add(li);
            }
        }

        if (!string.IsNullOrEmpty(Request.QueryString["id"]))
        {
            XmlDocument             xmldoc       = new XmlDocument();
            ContractAuditOfEToIInfo formDataInfo = Aitems.Get(FormID);
            if (!string.IsNullOrEmpty(formDataInfo.LeadersSelected))
            {
                xmldoc.LoadXml(formDataInfo.LeadersSelected);
            }
            //其他董事意见【其他总办会领导意见】
            XmlNode NodeLeaders = xmldoc.SelectSingleNode("//Directors");
            if (NodeLeaders != null && NodeLeaders.Attributes["ID"].Value.Length > 0)
            {
                foreach (string UserGuid in NodeLeaders.Attributes["ID"].Value.Split(','))
                {
                    for (int i = 0; i < cblDirectors.Items.Count; i++)
                    {
                        if (cblDirectors.Items[i].Value == UserGuid)
                        {
                            cblDirectors.Items[i].Selected = true;
                        }
                    }
                }
            }
            //董事长意见
            XmlNode NodeChairman = xmldoc.SelectSingleNode("//Chairman");
            if (NodeChairman != null && NodeChairman.Attributes["ID"].Value != "noapprovers")
            {
                cbChairman.Checked = true;
            }
            //总裁意见
            XmlNode NodePresident = xmldoc.SelectSingleNode("//President");
            if (NodePresident != null && NodePresident.Attributes["ID"].Value != "noapprovers")
            {
                cbPresident.Checked = true;
            }

            XmlNode NodeEVP = xmldoc.SelectSingleNode("//EVP");
            if (NodeEVP != null && NodeEVP.Attributes["ID"].Value != "noapprovers")
            {
                cbEVP.Checked = true;
            }
            XmlNode NodeCFO = xmldoc.SelectSingleNode("//CFO");
            if (NodeCFO != null && NodeCFO.Attributes["ID"].Value != "noapprovers")
            {
                cbCFO.Checked = true;
            }
            //相关部门主管副副总裁
            XmlNode NodeVP = xmldoc.SelectSingleNode("//VicePresident");
            if (NodeVP != null && NodeVP.Attributes["ID"].Value != "noapprovers")
            {
                cbVP.Checked = true;
            }
            //相关部门主管助理总裁
            XmlNode NodeAP = xmldoc.SelectSingleNode("//AssiPresident");
            if (NodeAP != null && NodeAP.Attributes["ID"].Value != "noapprovers")
            {
                cbAP.Checked = true;
            }
        }
        else
        {
            for (int i = 0; i < cblDirectors.Items.Count; i++)
            {
                cblDirectors.Items[i].Selected = false;
            }
        }
    }