Пример #1
0
        protected void LoadSln()
        {
            foreach (OleDbDataReader rd in OleDB.EachRows("select * from TSolution"))
            {
                Solution = new EnSolution();

                IList <Boolean> ActiveWeekArr = ExBuildListWithHexChar.HexStrToBooleanList(rd["FActiveWeek"].ToString());
                if (ActiveWeekArr.Count == Solution.ActiveWeekArr.Length)
                {
                    for (var i = 0; i < ActiveWeekArr.Count; i++)
                    {
                        Solution.ActiveWeekArr[i] = ActiveWeekArr[i];
                    }
                }

                IList <Int32> LessonNumberArr = ExBuildListWithHexChar.HexStrToInt32List(rd["FLessonNumber"].ToString());
                if (LessonNumberArr.Count == Solution.LessonNumberArr.Length)
                {
                    for (var i = 0; i < LessonNumberArr.Count; i++)
                    {
                        Solution.LessonNumberArr[i] = LessonNumberArr[i];
                    }
                }
            }
        }
Пример #2
0
        protected void SaveSln(EnSolution solution)
        {
            OleDB.ExecuteNonQuery("delete from TSolution");

            OleDB.ExecuteNonQuery("insert into TSolution (FActiveWeek, FLessonNumber) values ("
                                  + "'" + ExBuildListWithHexChar.GetHexStr(solution.ActiveWeekArr) + "'"
                                  + ",'" + ExBuildListWithHexChar.GetHexStr(solution.LessonNumberArr) + "'"
                                  + ")");
        }
Пример #3
0
            public SqdSchedule(EnSolution Sln, EnSquad Squad)
            {
                this.squad = Squad;

                matrix = new DtMatrix <ScheduleNode>(Sln);
                foreach (VcTime time in matrix.eachTime())
                {
                    matrix[time] = new ScheduleNode();
                }
            }
Пример #4
0
 public FcMatrixGrid(Control parent, EnSolution solution)
     : base(solution)
 {
     foreach (T t in this.eachCell())
     {
         t.Parent = parent;
     }
     foreach (HeadButton hb in this.eachBorderCell())
     {
         hb.Parent = parent;
     }
 }
Пример #5
0
        public static EnSolution GetDefaultSln()
        {
            EnSolution Result = new EnSolution();

            for (Int32 i = 1; i <= 5; i++)
            {
                Result.ActiveWeekArr[i] = true;
            }

            Result.LessonNumberArr[0] = 1;
            Result.LessonNumberArr[1] = 4;
            Result.LessonNumberArr[2] = 4;
            Result.LessonNumberArr[3] = 2;

            return(Result);
        }
Пример #6
0
 public FcMatrixPtr(EnSolution solution)
     : base(solution)
 {
 }
Пример #7
0
        public FcMatrix(EnSolution solution)
        {
            this.solution = solution;

            this.CreateMattes();
        }