Esempio n. 1
0
        public string Default_Init()
        {
            Hashtable ht = new Hashtable();

            ht.Add("UserNo", WebUser.No);
            ht.Add("UserName", WebUser.Name);

            BP.Port.Emp emp = new Emp();
            emp.No = WebUser.No;
            emp.Retrieve();

            //部门名称.
            ht.Add("DeptName", emp.FK_DeptText);

            if (SystemConfig.OSModel == OSModel.OneMore)
            {
                BP.GPM.DeptEmpStations des = new BP.GPM.DeptEmpStations();
                des.Retrieve(BP.GPM.DeptEmpStationAttr.FK_Emp, WebUser.No);

                string depts = "";
                string stas  = "";

                foreach (BP.GPM.DeptEmpStation item in des)
                {
                    BP.Port.Dept dept = new Dept(item.FK_Dept);
                    depts += dept.Name + "、";


                    BP.Port.Station sta = new Station(item.FK_Station);
                    stas += sta.Name + "、";
                }

                ht.Add("Depts", depts);
                ht.Add("Stations", stas);
            }



            BP.WF.Port.WFEmp wfemp = new Port.WFEmp(WebUser.No);
            ht.Add("Tel", wfemp.Tel);
            ht.Add("Email", wfemp.Email);
            return(BP.Tools.Json.ToJson(ht));
        }
Esempio n. 2
0
        public string Default_Init()
        {
            Hashtable ht = new Hashtable();

            ht.Add("UserNo", WebUser.No);
            ht.Add("UserName", WebUser.Name);

            BP.Port.Emp emp = new Emp();
            emp.No = WebUser.No;
            emp.Retrieve();

            //部门名称.
            ht.Add("DeptName", emp.FK_DeptText);

            if (SystemConfig.OSModel == OSModel.OneMore)
            {
                BP.GPM.DeptEmpStations des = new BP.GPM.DeptEmpStations();
                des.Retrieve(BP.GPM.DeptEmpStationAttr.FK_Emp, WebUser.No);

                string depts = "";
                string stas  = "";

                foreach (BP.GPM.DeptEmpStation item in des)
                {
                    BP.Port.Dept dept = new Dept();
                    dept.No = item.FK_Dept;
                    int count = dept.RetrieveFromDBSources();
                    if (count != 0)
                    {
                        depts += dept.Name + "、";
                    }


                    if (DataType.IsNullOrEmpty(item.FK_Station) == true)
                    {
                        //    item.Delete();
                        continue;
                    }

                    if (DataType.IsNullOrEmpty(item.FK_Dept) == true)
                    {
                        //   item.Delete();
                        continue;
                    }

                    BP.Port.Station sta = new Station();
                    sta.No = item.FK_Station;
                    count  = sta.RetrieveFromDBSources();
                    if (count != 0)
                    {
                        stas += sta.Name + "、";
                    }
                }

                ht.Add("Depts", depts);
                ht.Add("Stations", stas);
            }



            BP.WF.Port.WFEmp wfemp = new Port.WFEmp(WebUser.No);
            ht.Add("Tel", wfemp.Tel);
            ht.Add("Email", wfemp.Email);
            return(BP.Tools.Json.ToJson(ht));
        }