Beispiel #1
0
        protected void Btn_OK_Click(object sender, EventArgs e)
        {
            try
            {
                string         str = this.TB_SkipToEmp.Text.Trim();
                BP.WF.Port.Emp emp = new BP.WF.Port.Emp();
                emp.No = str;
                if (emp.RetrieveFromDBSources() == 0)
                {
                    BP.Sys.PubClass.Alert("人员编号输入错误:" + str);
                    return;
                }
                string note = this.TB_Note.Text.Trim();

                BP.WF.Node nd = new Node(int.Parse(this.DDL_SkipToNode.SelectedItem.Value));

                WorkFlow work = new WorkFlow(this.FK_Flow, WorkID);

                //执行发送.
                //string info =  BP.WF.Dev2Interface.Node_SendWork(this.FK_Flow, this.WorkID, null, null, nd.NodeID, emp.No).ToMsgOfText();
                string info = BP.WF.Dev2Interface.Flow_Schedule(this.WorkID, nd.NodeID, emp.No);
                BP.WF.Dev2Interface.WriteTrack(this.FK_Flow, nd.NodeID, this.WorkID, work.FID, note, ActionType.Shift, null, null, "跳转");
                // 提示.
                BP.Sys.PubClass.Alert("已经成功的跳转给:" + str + ",跳转到:" + nd.Name + "," + info);
                BP.Sys.PubClass.WinClose("ss");
            }
            catch (Exception ex)
            {
                BP.Sys.PubClass.Alert(ex.Message);
            }
        }
Beispiel #2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            #region 此部分可以省略.
            BP.WF.Port.Emp emp = new BP.WF.Port.Emp();
            emp.No = this.TB_No.Text;
            if (emp.IsExits == false)
            {
                this.ToMsg("用户名(" + emp.No + ")不存在....");
                return;
            }
            #endregion 此部分可以省略.

            //取到用户编号.
            string userNo = this.TB_No.Text;

            // 调用登录接口,写入登录信息.
            BP.WF.Dev2Interface.Port_Login(userNo);

            //与登陆相对应的是退出。
            //BP.WF.Dev2Interface.Port_SigOut();


            /* 在以后的程序里,可以访问。
             */
            //string logUserNo = BP.Web.WebUser.No;
            //string logUserName = BP.Web.WebUser.Name;
            //string logUserDeptNo = BP.Web.WebUser.FK_Dept;
            //string logUserDeptName = BP.Web.WebUser.FK_DeptName;

            //转到待办.
            this.Response.Redirect("Default.aspx", true);
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            #region 此部分可以省略.
            BP.WF.Port.Emp emp = new BP.WF.Port.Emp();
            emp.No = this.TB_No.Text;
            if (emp.IsExits == false)
            {
                this.ToMsg("用户名(" + emp.No + ")不存在....");
                return;
            }
            #endregion 此部分可以省略.

            //取到用户编号.
            string userNo = this.TB_No.Text;
            // 调用登录接口,写入登录信息。
            BP.WF.Dev2Interface.Port_Login(userNo);

            //转到待办.
            this.Response.Redirect("Default.aspx", true);
        }
        protected void Btn_OK_Click(object sender, EventArgs e)
        {
            string str = this.TB_Emp.Text.Trim();

            BP.WF.Port.Emp emp = new BP.WF.Port.Emp();
            emp.No = str;
            if (emp.RetrieveFromDBSources() == 0)
            {
                BP.Sys.PubClass.Alert("人员编号输入错误:" + str);
                return;
            }

            string note = this.TB_Note.Text.Trim();

            //执行移交.
            BP.WF.Dev2Interface.Node_Shift(this.FK_Flow, this.FK_Node, this.WorkID, this.FID, emp.No, note);

            // 提示.
            BP.Sys.PubClass.Alert("已经成功的移交给:" + str);
            BP.Sys.PubClass.WinClose("ss");
        }
        protected void Btn_OK_Click(object sender, EventArgs e)
        {
            string str = this.TB_SkipToEmp.Text.Trim();

            BP.WF.Port.Emp emp = new BP.WF.Port.Emp();
            emp.No = str;
            if (emp.RetrieveFromDBSources() == 0)
            {
                BP.Sys.PubClass.Alert("人员编号输入错误:" + str);
                return;
            }

            string note = this.TB_Note.Text.Trim();

            BP.WF.Node nd = new Node(int.Parse(this.DDL_SkipToNode.SelectedValue));

            //执行发送.
            BP.WF.Dev2Interface.Node_SendWork(this.FK_Flow, this.WorkID, null, null, nd.NodeID, emp.No);

            // 提示.
            BP.Sys.PubClass.Alert("已经成功的跳转给:" + str + ",跳转到:" + nd.Name);
            BP.Sys.PubClass.WinClose("ss");
        }
Beispiel #6
0
        private string GetStructureTreeTable()
        {
            DataTable dt = new DataTable();

            dt.Columns.Add("NO", typeof(string));
            dt.Columns.Add("PARENTNO", typeof(string));
            dt.Columns.Add("NAME", typeof(string));
            dt.Columns.Add("TTYPE", typeof(string));

            if (BP.WF.Glo.OSModel == OSModel.OneOne)
            {
                BP.WF.Port.Depts depts = new BP.WF.Port.Depts();
                depts.RetrieveAll();
                BP.WF.Port.Stations sts = new BP.WF.Port.Stations();
                sts.RetrieveAll();
                BP.WF.Port.Emps emps = new BP.WF.Port.Emps();
                emps.RetrieveAll(BP.WF.Port.EmpAttr.Name);
                BP.WF.Port.EmpStations empsts = new BP.WF.Port.EmpStations();
                empsts.RetrieveAll();
                BP.GPM.DeptEmps empdetps = new BP.GPM.DeptEmps();
                empdetps.RetrieveAll();

                //部门人员
                Dictionary <string, List <string> > des = new Dictionary <string, List <string> >();
                //岗位人员
                Dictionary <string, List <string> > ses = new Dictionary <string, List <string> >();
                //部门岗位
                Dictionary <string, List <string> > dss = new Dictionary <string, List <string> >();
                BP.WF.Port.Station stt  = null;
                BP.WF.Port.Emp     empt = null;

                foreach (BP.WF.Port.Dept dept in depts)
                {
                    //增加部门
                    dt.Rows.Add(dept.No, dept.ParentNo, dept.Name, "DEPT");
                    des.Add(dept.No, new List <string>());
                    dss.Add(dept.No, new List <string>());

                    //获取部门下的岗位
                    empdetps.Retrieve(BP.GPM.DeptEmpAttr.FK_Dept, dept.No);
                    foreach (BP.GPM.DeptEmp empdept in empdetps)
                    {
                        des[dept.No].Add(empdept.FK_Emp);
                        //判断该人员拥有的岗位
                        empsts.Retrieve(BP.WF.Port.EmpStationAttr.FK_Emp, empdept.FK_Emp);
                        foreach (BP.WF.Port.EmpStation es in empsts)
                        {
                            if (ses.ContainsKey(es.FK_Station))
                            {
                                if (ses[es.FK_Station].Contains(es.FK_Emp) == false)
                                {
                                    ses[es.FK_Station].Add(es.FK_Emp);
                                }
                            }
                            else
                            {
                                ses.Add(es.FK_Station, new List <string> {
                                    es.FK_Emp
                                });
                            }

                            //增加部门的岗位
                            if (dss[dept.No].Contains(es.FK_Station) == false)
                            {
                                stt = sts.GetEntityByKey(es.FK_Station) as BP.WF.Port.Station;

                                if (stt == null)
                                {
                                    continue;
                                }

                                dss[dept.No].Add(es.FK_Station);
                                dt.Rows.Add(dept.No + "|" + es.FK_Station, dept.No, stt.Name, "STATION");
                            }
                        }
                    }
                }

                foreach (KeyValuePair <string, List <string> > ds in dss)
                {
                    foreach (string st in ds.Value)
                    {
                        foreach (string emp in ses[st])
                        {
                            empt = emps.GetEntityByKey(emp) as BP.WF.Port.Emp;

                            if (empt == null)
                            {
                                continue;
                            }

                            dt.Rows.Add(ds.Key + "|" + st + "|" + emp, ds.Key + "|" + st, empt.Name, "EMP");
                        }
                    }
                }
            }
            else
            {
                BP.GPM.Depts depts = new BP.GPM.Depts();
                depts.RetrieveAll();
                BP.GPM.Stations sts = new BP.GPM.Stations();
                sts.RetrieveAll();
                BP.GPM.Emps emps = new BP.GPM.Emps();
                emps.RetrieveAll(BP.WF.Port.EmpAttr.Name);
                BP.GPM.DeptStations dss = new BP.GPM.DeptStations();
                dss.RetrieveAll();
                BP.GPM.DeptEmpStations dess = new BP.GPM.DeptEmpStations();
                dess.RetrieveAll();
                BP.GPM.Station stt  = null;
                BP.GPM.Emp     empt = null;

                foreach (BP.GPM.Dept dept in depts)
                {
                    //增加部门
                    dt.Rows.Add(dept.No, dept.ParentNo, dept.Name, "DEPT");

                    //增加部门岗位
                    dss.Retrieve(BP.GPM.DeptStationAttr.FK_Dept, dept.No);
                    foreach (BP.GPM.DeptStation ds in dss)
                    {
                        stt = sts.GetEntityByKey(ds.FK_Station) as BP.GPM.Station;

                        if (stt == null)
                        {
                            continue;
                        }

                        dt.Rows.Add(dept.No + "|" + ds.FK_Station, dept.No, stt.Name, "STATION");

                        //增加部门岗位人员
                        dess.Retrieve(BP.GPM.DeptEmpStationAttr.FK_Dept, dept.No, BP.GPM.DeptEmpStationAttr.FK_Station,
                                      ds.FK_Station);

                        foreach (BP.GPM.DeptEmpStation des in dess)
                        {
                            empt = emps.GetEntityByKey(des.FK_Emp) as BP.GPM.Emp;

                            if (empt == null)
                            {
                                continue;
                            }

                            dt.Rows.Add(dept.No + "|" + ds.FK_Station + "|" + des.FK_Emp, dept.No + "|" + ds.FK_Station,
                                        empt.Name, "EMP");
                        }
                    }
                }
            }

            return(Newtonsoft.Json.JsonConvert.SerializeObject(dt));
        }