コード例 #1
0
        public List <Shift_schedule_ViewModel> SelectApplication_unit()
        {
            Application_unit_Model          application_Unit_Model = new Application_unit_Model();
            List <Shift_schedule_ViewModel> Shift_schedules        = new List <Shift_schedule_ViewModel>();

            foreach (var row in application_Unit_Model.SelectApplication_unit())
            {
                Shift_schedule_ViewModel shift_Schedule_ViewModel = new Shift_schedule_ViewModel();
                shift_Schedule_ViewModel.Application_unit_no = row.Application_unit_no;
                shift_Schedule_ViewModel.Application_unit    = row.Application_unit;

                Shift_schedules.Add(shift_Schedule_ViewModel);
            }

            return(Shift_schedules);
        }
コード例 #2
0
        public List <Application_unit_ViewModel> SelectApplication_unit(string name, string group_name, int membersmin, int membersmax)
        {
            Application_unit_Model            application_Unit_Model      = new Application_unit_Model();
            List <Application_unit_Model>     Application_unit_Models     = application_Unit_Model.SelectApplication_unit(name, group_name, membersmin, membersmax);
            List <Application_unit_ViewModel> application_Unit_ViewModels = new List <Application_unit_ViewModel>();

            foreach (var row in Application_unit_Models)
            {
                Application_unit_ViewModel application_Unit_ViewModel = new Application_unit_ViewModel();
                application_Unit_ViewModel.Application_unit_no = row.Application_unit_no;
                application_Unit_ViewModel.Application_unit    = row.Application_unit;
                application_Unit_ViewModel.Group = row.Group;
                application_Unit_ViewModel.Application_phone_no = row.Application_phone_no;
                application_Unit_ViewModel.Principal            = row.Principal;
                application_Unit_ViewModel.Principal_phone_no   = row.Principal_phone_no;
                application_Unit_ViewModel.Application_address  = row.Application_address;
                application_Unit_ViewModel.Work_content         = row.Work_content;
                application_Unit_ViewModel.Total_volunteers     = row.Total_volunteers;

                application_Unit_ViewModels.Add(application_Unit_ViewModel);
            }

            return(application_Unit_ViewModels);
        }