public parentsDTO GetParentsById(string id)
        {
            perentsBL  parents = new perentsBL();
            parentsDTO parent  = parents.GetParentById(id);

            return(parent);
        }
        public List <schedulingDTO> GetShibutsForParents(string id)
        {
            perentsBL            parents = new perentsBL();
            List <schedulingDTO> parent  = parents.GetShibutsForParents(id);

            return(parent);
        }
        public List <parentsDTO> GetParentsByCodeInstation(int id)
        {
            perentsBL         parents = new perentsBL();
            List <parentsDTO> parent  = parents.GetParentByCodeInstatition(id);

            return(parent);
        }
Esempio n. 4
0
        //פונקצית הערכה
        //מקבלת אוסף -ליסט- של השיבוץ של כל בית הספר
        //ומחזירה ציון לשיבוץ
        //לפי
        //1. פרק הזמן שאמא לכמה בנות שוהה בבית הספר
        //2. רמת סטיה מבקשות של אמהות
        private double mark()
        {
            //!!!!!!!!!!!!!!!!!!!!לשלוף את כל האמהות מהמסד נתונים
            List <parents> lst_par = perentsDAL.GetAllParents();
            double         avg = 0, cntExp = 0;
            TimeSpan       min = new TimeSpan(00, 0, 0);
            TimeSpan       max = new TimeSpan(12, 0, 0);
            TimeSpan       temp;
            perentsBL      pars = new perentsBL();
            requestBL      r    = new requestBL();

            //1. פרק הזמן שאמא לכמה בנות שוהה בבית הספר
            foreach (parents p in lst_par)
            {
                List <studens> lst_k = pars.get_Allkids(p.id);
                for (int i = 0; i < lst_k.Count(); i++)
                {
                    //השוואה של timespan
                    temp = lstscheduling.Where(x => x.id_student == lst_k[i].id).FirstOrDefault().hour_;
                    if (temp > (max))
                    {
                        max = temp;
                    }
                    if (temp < min)
                    {
                        min = temp;
                    }
                }
                avg = Convert.ToInt32(max - min) / lst_k.Count();
                if (avg > 30)
                {
                    cntExp++;
                }
            }
            //2. רמת סטיה מבקשות של אמהות
            foreach (parents p in lst_par)
            {
                //List<request> lst_r =r;
            }
            return(0);
        }
Esempio n. 5
0
        public void addparents()
        {
            parentsDTO   p    = new parentsDTO();
            StreamReader read = new StreamReader(@"d:\parents.csv", Encoding.Default);
            string       str  = read.ReadToEnd();

            string[] arr = str.Split('\n');
            for (int i = 0; i < arr.Length; i++)
            {
                int      j    = 0;
                string[] arr1 = arr[i].Split(',');
                p.id             = arr1[j++];
                p.first_name     = arr1[j++];
                p.last_name      = arr1[j++];
                p.telefone       = arr1[j++];
                p.email          = arr1[j++];
                p.code_instation = int.Parse(arr1[j++]);
                perentsBL pBL = new perentsBL();
                pBL.AddParents(p);
                Console.WriteLine();
            }
            Console.ReadLine();
        }
        public void Delete(string parentsID)
        {
            perentsBL perentBL = new perentsBL();

            perentBL.DeleteParents(parentsID);
        }
        public void Put(parentsDTO parentsDTO)
        {
            perentsBL perentBL = new perentsBL();

            perentBL.UpdateParents(parentsDTO);
        }
        public void Post(parentsDTO parentsDTO)
        {
            perentsBL perentBL = new perentsBL();

            perentBL.AddParents(parentsDTO);
        }
        public List <TimeSpan> getHours(string tz)
        {
            perentsBL perentBL = new perentsBL();

            return(perentBL.getAllH(tz));
        }