Esempio n. 1
0
        public void AddGroupToteacher()
        {
            string techerList;
            string grouplist;
            string text;
            int    tIndex  = 0;
            int    gIndex  = 0;
            int    subject = ChoiceSubject();

            techerList = infoService.GetSubjTeacher(subject);
            grouplist  = infoService.GetGroup();
            if (techerList == "")
            {
                Console.WriteLine("\\\\|We dont have teacher|//");
                return;
            }
            else if (grouplist == "")
            {
                Console.WriteLine("\\\\|We dont have group|//");
                return;
            }
            while (true)
            {
                tIndex = NumberCheck("\n-|Choise Teacher|-\n" + techerList, infoService.GetSubjTeacherCount(subject));
                gIndex = NumberCheck("\n-|Choise Group|-\n" + grouplist, infoService.GetGroupCount());
                text   = service.AddGroupToTecher(tIndex, gIndex, subject);
                if ("" != text)
                {
                    Console.WriteLine(text + "(exit 0)");
                    choise = Console.ReadLine();
                    if (choise == "0")
                    {
                        return;
                    }
                }
                else
                {
                    return;
                }
            }
        }