Пример #1
0
        public static List <GeoDeptViewModel> getGeoDeptReports()
        {
            List <GeoDeptViewModel> geoReports = new List <GeoDeptViewModel>();
            GeoReportAccess         access     = new GeoReportAccess();
            DataTable dtResult = access.GetTreeGeoReports();

            foreach (DataRow dtr in dtResult.Rows)
            {
                GeoDeptViewModel item = new GeoDeptViewModel
                {
                    GEOREPORTCD = dtr["REPORTCD"].ToString(),
                    DEPTNAME    = dtr["DEPTNAME"].ToString(),
                    DEPTCODE    = dtr["DEPTCODE"].ToString(),
                    DEPTPARENT  = dtr["DEPTPARENT"].ToString()
                };
                geoReports.Add(item);
            }
            return(geoReports);
        }
Пример #2
0
        public static List <OriganizationUsersViewModel> getUsersGeoDeptReports()
        {
            List <OriganizationUsersViewModel> geoReports = new List <OriganizationUsersViewModel>();
            GeoReportAccess access   = new GeoReportAccess();
            DataTable       dtResult = access.GetTreeGeoReports();

            foreach (DataRow dtr in dtResult.Rows)
            {
                OriganizationUsersViewModel item = new OriganizationUsersViewModel
                {
                    Display     = dtr["DEPTNAME"].ToString(),
                    Key         = dtr["REPORTCD"].ToString(),
                    Flag        = 0,
                    GEOREPORTCD = dtr["REPORTCD"].ToString(),
                    SYS_EMPID   = dtr["SYS_EMPID"].ToString(),
                    DEPTNAME    = dtr["DEPTNAME"].ToString(),
                    DEPTCODE    = dtr["DEPTCODE"].ToString(),
                    DEPTPARENT  = dtr["DEPTPARENT"].ToString()
                };
                geoReports.Add(item);
            }
            return(geoReports);
        }