public List <Abnormal_event_ViewModel> SelectAbnormal_Event_byStage(string stage, string category, string application_unit, DateTime startdate, DateTime enddate)
        {
            Abnormal_event_Model        abnormal_Event_Model  = new Abnormal_event_Model();
            List <Abnormal_event_Model> abnormal_Event_Models = abnormal_Event_Model.SelectAbnormal_event_byStage(stage, category, application_unit, startdate, enddate);

            List <Abnormal_event_ViewModel> abnormal_Event_ViewModels = new List <Abnormal_event_ViewModel>();

            foreach (var row in abnormal_Event_Models)
            {
                Abnormal_event_ViewModel abnormal_Event_ViewModel = new Abnormal_event_ViewModel();
                abnormal_Event_ViewModel.Abnormal_event_no      = row.Abnormal_event_no;
                abnormal_Event_ViewModel.Abnormal_event_ID      = row.Abnormal_event_ID;
                abnormal_Event_ViewModel.Abnormal_event         = row.Abnormal_event;
                abnormal_Event_ViewModel.Volunteer_name         = row.Volunteer_name;
                abnormal_Event_ViewModel.Application_unit       = row.Application_unit;
                abnormal_Event_ViewModel.event_category         = row.event_category;
                abnormal_Event_ViewModel.Stage                  = row.Stage;
                abnormal_Event_ViewModel.Notification_date      = row.Notification_date;
                abnormal_Event_ViewModel.Closing_date           = row.Closing_date;
                abnormal_Event_ViewModel.Supervisor             = row.Supervisor;
                abnormal_Event_ViewModel.Unit_descrition        = row.Unit_descrition;
                abnormal_Event_ViewModel.Volunteer_description  = row.Volunteer_description;
                abnormal_Event_ViewModel.Supervisor_description = row.Supervisor_description;
                abnormal_Event_ViewModel.Result                 = row.Result;
                abnormal_Event_ViewModel.Volunteer_leader       = row.Volunteer_leader;
                abnormal_Event_ViewModel.Supervisor_heads       = row.Supervisor_heads;

                abnormal_Event_ViewModels.Add(abnormal_Event_ViewModel);
            }

            return(abnormal_Event_ViewModels);
        }
Пример #2
0
        public List <string> Selectevent_category()
        {
            List <string>            event_categorys          = new List <string>();
            Abnormal_event_ViewModel abnormal_Event_ViewModel = new Abnormal_event_ViewModel();

            foreach (var row in abnormal_Event_ViewModel.Selectevent_category())
            {
                event_categorys.Add(row);
            }

            return(event_categorys);
        }