Ejemplo n.º 1
0
        private void BracketsSheet()
        {
            ExWs      = XlWb.Worksheets.Add();
            ExWs.Name = "בתים";
            ExWs.Select();

            int counter = 5;

            foreach (Visual.VisualBracket vb in LeagueEventData._VisualBracketsList)
            {
                // bracket description
                BracketHeader(counter, vb.Bracket.ToString());

                counter += 2;
                foreach (Visual.VisualContender c in vb.VisualCont)
                {
                    ExWs.Cells[counter, 2] = c.Contender.ID;
                    ExWs.Cells[counter, 3] = c.Contender.FirstName;
                    ExWs.Cells[counter, 4] = c.Contender.LastName;
                    ExWs.Cells[counter, 5] = c.Contender.HebrewBeltColor;
                    ExWs.Cells[counter, 6] = c.Contender.GetWeightValue;
                    ExWs.Cells[counter, 7] = " " + c.Contender.GetAgeValue + " ";
                    ExWs.Cells[counter, 8] = c.Contender.AcademyName;
                    ExWs.Cells[counter, 9] = Contenders.ContndersGeneral.GetFactorExplanation(c, vb);

                    RowsDesign(counter);
                    counter++;
                }

                counter += 1;
            }

            // sheet header
            sheetHeader(ExWs.Range["b2:i3"], "IBJJL רשימת בתים מסכמת");
            // signature
            sheetSignature(ExWs.Range["b1:i1"]);

            ExWs.Columns["A:M"].autofit();
        }
Ejemplo n.º 2
0
        private void UnplacedSheet()
        {
            ExWs      = XlWb.Worksheets.Add();
            ExWs.Name = "ללא שיבוץ";
            ExWs.Select();

            int counter = 5;

            BracketHeader(counter, "מתחרים שלא שובצו על ידי המערכת");
            // fix the last column header
            ExWs.Cells[counter + 1, 9] = "ללא מתחרים מתאימים באירוע";
            counter += 2;

            foreach (Visual.VisualContender c in LeagueEventData._VisualUnplacedBracketsList)
            {
                ExWs.Cells[counter, 2] = c.Contender.ID;
                ExWs.Cells[counter, 3] = c.Contender.FirstName;
                ExWs.Cells[counter, 4] = c.Contender.LastName;
                ExWs.Cells[counter, 5] = c.Contender.HebrewBeltColor;
                ExWs.Cells[counter, 6] = c.Contender.GetWeightValue;
                ExWs.Cells[counter, 7] = " " + c.Contender.GetAgeValue + " ";
                ExWs.Cells[counter, 8] = c.Contender.AcademyName;
                ExWs.Cells[counter, 9] = (c.IsUseless == true) ? "כן" : "לא";


                RowsDesign(counter);
                counter++;
            }

            // sheet header
            sheetHeader(ExWs.Range["b2:i3"], "מתחרים ללא שיבוץ");
            // signature
            sheetSignature(ExWs.Range["b1:i1"]);

            ExWs.Columns["A:M"].autofit();
        }