Ejemplo n.º 1
0
        public void SelfLinking(DataTable Tab, int id)
        {
            int    GetCode;
            string CurrentString;
            bool   Detected;

            //Связь по лабораторным работам
            GetCode  = 0;
            Detected = false;
            for (int i = 0; i <= mdlData.colDistribution.Count - 1; i++)
            {
                CurrentString = Tab.Rows[id]["Связь_лб"].ToString();
                if (mdlData.colDistribution[i].Code.ToString() == CurrentString)
                {
                    GetCode  = i;
                    Detected = true;
                }
            }
            if (Detected)
            {
                this.LabWorkConnect = mdlData.colDistribution[GetCode];
            }
            else
            {
                this.LabWorkConnect = null;
            }
        }
Ejemplo n.º 2
0
        public void CrossLinking(DataTable Tab, int id, bool flgHoured)
        {
            int    GetCode;
            string CurrentString;
            bool   Detected;

            //Применительно к учебной нагрузке - искать соответствие в почасовой
            if (!flgHoured)
            {
                //Связь по почасовой нагрузке
                GetCode  = 0;
                Detected = false;
                for (int i = 0; i <= mdlData.colHouredDistribution.Count - 1; i++)
                {
                    CurrentString = Tab.Rows[id]["Связь_почас"].ToString();
                    if (mdlData.colHouredDistribution[i].Code.ToString() == CurrentString)
                    {
                        GetCode  = i;
                        Detected = true;
                    }
                }
                if (Detected)
                {
                    this.HouredConnect = mdlData.colHouredDistribution[GetCode];
                }
                else
                {
                    this.HouredConnect = null;
                }
            }
            //Применительно к почасовой нагрузке - искать соответствие в учебной
            else
            {
                //Связь по почасовой нагрузке
                GetCode  = 0;
                Detected = false;
                for (int i = 0; i <= mdlData.colDistribution.Count - 1; i++)
                {
                    CurrentString = Tab.Rows[id]["Связь_почас"].ToString();
                    if (mdlData.colDistribution[i].Code.ToString() == CurrentString)
                    {
                        GetCode  = i;
                        Detected = true;
                    }
                }
                if (Detected)
                {
                    this.HouredConnect = mdlData.colDistribution[GetCode];
                }
                else
                {
                    this.HouredConnect = null;
                }
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Метод копирования в рассматриваемый элемент информации от внешнего элемента
        /// </summary>
        /// <param name="Input">Внешний элемент</param>
        /// <param name="flgHours">Флаг сохранения часов нагрузки true - сохранить, false - стереть</param>
        public void CopyFrom(clsDistribution Input, bool flgHours)
        {
            Code       = Input.Code;
            Semestr    = Input.Semestr;
            Speciality = Input.Speciality;
            KursNum    = Input.KursNum;
            Subject    = Input.Subject;
            Lecturer   = Input.Lecturer;
            Lecturer2  = Input.Lecturer2;
            Lecturer3  = Input.Lecturer3;
            Doubler    = Input.Doubler;

            if (flgHours)
            {
                Lecture            = Input.Lecture;
                Exam               = Input.Exam;
                Credit             = Input.Credit;
                RefHomeWork        = Input.RefHomeWork;
                Tutorial           = Input.Tutorial;
                LabWork            = Input.LabWork;
                Practice           = Input.Practice;
                IndividualWork     = Input.IndividualWork;
                KRAPK              = Input.KRAPK;
                KursProject        = Input.KursProject;
                PreDiplomaPractice = Input.PreDiplomaPractice;
                DiplomaPaper       = Input.DiplomaPaper;
                TutorialPractice   = Input.TutorialPractice;
                ProducingPractice  = Input.ProducingPractice;
                PostGrad           = Input.PostGrad;
                GAK           = Input.GAK;
                Hours         = Input.Hours;
                HoursZ        = Input.HoursZ;
                EnteredHours  = Input.EnteredHours;
                EnteredHoursZ = Input.EnteredHoursZ;
                Visiting      = Input.Visiting;
                Magistry      = Input.Magistry;
            }
            else
            {
                Lecture            = 0;
                Exam               = 0;
                Credit             = 0;
                RefHomeWork        = 0;
                Tutorial           = 0;
                LabWork            = 0;
                Practice           = 0;
                IndividualWork     = 0;
                KRAPK              = 0;
                KursProject        = 0;
                PreDiplomaPractice = 0;
                DiplomaPaper       = 0;
                TutorialPractice   = 0;
                ProducingPractice  = 0;
                PostGrad           = 0;
                GAK           = 0;
                Hours         = 0;
                HoursZ        = 0;
                EnteredHours  = 0;
                EnteredHoursZ = 0;
                Visiting      = 0;
                Magistry      = 0;
            }

            Text           = Input.Text;
            flgDispatch    = Input.flgDispatch;
            LabWorkConnect = Input.LabWorkConnect;
            flgDistrib     = Input.flgDistrib;
            Weight         = Input.Weight;
            flgExclude     = Input.flgExclude;
            DocCode        = Input.DocCode;
            HouredConnect  = Input.HouredConnect;
        }