Esempio n. 1
0
        protected void IniColumns()
        {
            GridColumnCollection columns = grid.PrimaryGrid.Columns;
            ColumnGroupHeader cghFile = new ColumnGroupHeader();
            cghFile.Name = "cghFile";
            cghFile.HeaderText = "文件";
            cghFile.MinRowHeight = 40;
            cghFile.StartDisplayIndex = columns.GetDisplayIndex(columns[0]);
            cghFile.EndDisplayIndex = columns.GetDisplayIndex(columns[1]);
            grid.PrimaryGrid.ColumnHeader.GroupHeaders.Add(cghFile);

            var cghLoc = new ColumnGroupHeader();
            cghLoc.Name = "cghLoc";
            cghLoc.HeaderText = "本地版本";
            cghLoc.MinRowHeight = 40;
            cghLoc.StartDisplayIndex = columns.GetDisplayIndex(columns[2]);
            cghLoc.EndDisplayIndex = columns.GetDisplayIndex(columns[3]);
            grid.PrimaryGrid.ColumnHeader.GroupHeaders.Add(cghLoc);

            var cghSer = new ColumnGroupHeader();
            cghSer.Name = "cghLoc";
            cghSer.HeaderText = "服务器版本";
            cghSer.MinRowHeight = 40;
            cghSer.StartDisplayIndex = columns.GetDisplayIndex(columns[4]);
            cghSer.EndDisplayIndex = columns.GetDisplayIndex(columns[5]);
            grid.PrimaryGrid.ColumnHeader.GroupHeaders.Add(cghSer);
        }
Esempio n. 2
0
        private ColumnGroupHeader GetLevelHeader(GridColumnCollection columns)
        {
            ColumnGroupHeader cgh = new ColumnGroupHeader();

            cgh.Name         = "Levels";
            cgh.MinRowHeight = 28;

            // Enable MiniMarkup and set the header text as needed

            cgh.EnableHeaderMarkup = true;

            cgh.HeaderText = "<div align=\"center\"><font size=\"12\">A等品</font> </div>";

            cgh.HeaderStyles.MouseOver.Background = new Background(Color.Yellow);
            cgh.HeaderStyles.Default.Background   = new Background(Color.LightYellow);
            // Create and add the subordinate group headers

            ColumnGroupHeader cshArea = GetWXHeader(columns);
            ColumnGroupHeader cshPop  = GetNXHeader(columns);

            cgh.GroupHeaders.Add(cshArea);
            cgh.GroupHeaders.Add(cshPop);

            // We want the header to also contain the 'City' column
            // so we must include it in the display range.

            cgh.StartDisplayIndex = GetDisplayIndex(columns, "WXQTY");
            cgh.EndDisplayIndex   = GetDisplayIndex(columns, "NXRATE");
            return(cgh);
        }
Esempio n. 3
0
        private ColumnGroupHeader GetQtyInfoHeader(string fieldname, string headertext, GridColumnCollection columns)
        {
            ColumnGroupHeader cgh = new ColumnGroupHeader();

            cgh.Name = fieldname;
            //cgh.Name = "RegionalInfo";
            cgh.HeaderText = headertext;
            // Set the header to not show the root column headers, and
            // perform some misc Style/display related setup.
            //cgh.
            //cgh.ShowColumnHeaders = Tbool.False;
            cgh.MinRowHeight = 36;

            //cgh.HeaderStyles.Default.Image = imageList1.Images["Cog"];
            cgh.HeaderStyles.Default.ImageAlignment = Alignment.MiddleCenter;
            cgh.HeaderStyles.Default.Background     = new Background(Color.LightYellow, Color.Khaki);
            cgh.HeaderStyles.MouseOver.Background   = new Background(Color.Khaki, Color.LightYellow);

            // Set the header's start and end Display Indecees

            cgh.StartDisplayIndex = GetDisplayIndex(columns, fieldname);
            cgh.EndDisplayIndex   = GetDisplayIndex(columns, fieldname) + 1;

            GridColumn column = columns[GetDisplayIndex(columns, fieldname)];

            column.Width = 50;
            //column.HeaderStyles.Styles.
            column       = columns[GetDisplayIndex(columns, fieldname) + 1];
            column.Width = 50;

            return(cgh);
        }
Esempio n. 4
0
        private ColumnGroupHeader GetModelHeader(GridColumnCollection columns)
        {
            ColumnGroupHeader cgh = new ColumnGroupHeader();

            //cgh.Name = "LevelB";
            cgh.MinRowHeight = 28;


            cgh.EnableHeaderMarkup = true;

            cgh.HeaderText = "<div align=\"center\"><font size=\"12\">成型缺陷</font> </div>";

            cgh.HeaderStyles.MouseOver.Background = new Background(Color.Yellow);
            cgh.HeaderStyles.Default.Background   = new Background(Color.SandyBrown);
            // Create and add the subordinate group headers

            ColumnGroupHeader csh1  = GetHeader(columns, "加工斑点", GetDisplayIndex(columns, "JGBDQty"), GetDisplayIndex(columns, "JGBDRate"), Color.SandyBrown);
            ColumnGroupHeader csh2  = GetHeader(columns, "针孔", GetDisplayIndex(columns, "ZKQty"), GetDisplayIndex(columns, "ZKRate"), Color.SandyBrown);
            ColumnGroupHeader csh3  = GetHeader(columns, "斑点", GetDisplayIndex(columns, "BDQty"), GetDisplayIndex(columns, "BDRate"), Color.SandyBrown);
            ColumnGroupHeader csh4  = GetHeader(columns, "阴裂", GetDisplayIndex(columns, "YLQty"), GetDisplayIndex(columns, "YLRate"), Color.SandyBrown);
            ColumnGroupHeader csh5  = GetHeader(columns, "凹凸", GetDisplayIndex(columns, "ATQty"), GetDisplayIndex(columns, "ATRate"), Color.SandyBrown);
            ColumnGroupHeader csh6  = GetHeader(columns, "泥渣", GetDisplayIndex(columns, "NZQty"), GetDisplayIndex(columns, "NZRate"), Color.SandyBrown);
            ColumnGroupHeader csh7  = GetHeader(columns, "缺泥", GetDisplayIndex(columns, "QNQty"), GetDisplayIndex(columns, "QNRate"), Color.SandyBrown);
            ColumnGroupHeader csh8  = GetHeader(columns, "粗糙", GetDisplayIndex(columns, "CCQty"), GetDisplayIndex(columns, "CCRate"), Color.SandyBrown);
            ColumnGroupHeader csh9  = GetHeader(columns, "开裂", GetDisplayIndex(columns, "KLQty"), GetDisplayIndex(columns, "KLRate"), Color.SandyBrown);
            ColumnGroupHeader csh10 = GetHeader(columns, "裂耳", GetDisplayIndex(columns, "LEQty"), GetDisplayIndex(columns, "LERate"), Color.SandyBrown);
            ColumnGroupHeader csh11 = GetHeader(columns, "变形", GetDisplayIndex(columns, "BXQty"), GetDisplayIndex(columns, "BXRate"), Color.SandyBrown);
            ColumnGroupHeader csh12 = GetHeader(columns, "其他", GetDisplayIndex(columns, "CXQTQty"), GetDisplayIndex(columns, "CXQTRate"), Color.SandyBrown);
            ColumnGroupHeader csh13 = GetHeader(columns, "小计", GetDisplayIndex(columns, "sumQty2"), GetDisplayIndex(columns, "sumRate2"), Color.SandyBrown);

            cgh.GroupHeaders.Add(csh1);
            cgh.GroupHeaders.Add(csh2);
            cgh.GroupHeaders.Add(csh3);
            cgh.GroupHeaders.Add(csh4);
            cgh.GroupHeaders.Add(csh5);
            cgh.GroupHeaders.Add(csh6);
            cgh.GroupHeaders.Add(csh7);
            cgh.GroupHeaders.Add(csh8);
            cgh.GroupHeaders.Add(csh9);
            cgh.GroupHeaders.Add(csh10);
            cgh.GroupHeaders.Add(csh11);
            cgh.GroupHeaders.Add(csh12);
            cgh.GroupHeaders.Add(csh13);


            // We want the header to also contain the 'City' column
            // so we must include it in the display range.

            cgh.StartDisplayIndex = GetDisplayIndex(columns, "JGBDQty");
            cgh.EndDisplayIndex   = GetDisplayIndex(columns, "sumRate2");
            return(cgh);
        }
Esempio n. 5
0
        private ColumnGroupHeader GetGlazeHeader(GridColumnCollection columns)
        {
            ColumnGroupHeader cgh = new ColumnGroupHeader();

            //cgh.Name = "LevelB";
            cgh.MinRowHeight = 28;


            cgh.EnableHeaderMarkup = true;

            cgh.HeaderText = "<div align=\"center\"><font size=\"12\">釉彩缺陷</font> </div>";

            cgh.HeaderStyles.MouseOver.Background = new Background(Color.Yellow);
            cgh.HeaderStyles.Default.Background   = new Background(Color.Aquamarine);
            // Create and add the subordinate group headers

            ColumnGroupHeader csh1  = GetHeader(columns, "色不均", GetDisplayIndex(columns, "SBJQty"), GetDisplayIndex(columns, "SBJRate"), Color.Aquamarine);
            ColumnGroupHeader csh2  = GetHeader(columns, "色脏", GetDisplayIndex(columns, "SZQty"), GetDisplayIndex(columns, "SZRate"), Color.Aquamarine);
            ColumnGroupHeader csh3  = GetHeader(columns, "缺釉", GetDisplayIndex(columns, "QYQty"), GetDisplayIndex(columns, "QYRate"), Color.Aquamarine);
            ColumnGroupHeader csh4  = GetHeader(columns, "釉彩斑点", GetDisplayIndex(columns, "YCBDQty"), GetDisplayIndex(columns, "YCBDRate"), Color.Aquamarine);
            ColumnGroupHeader csh5  = GetHeader(columns, "缩釉", GetDisplayIndex(columns, "SYQty"), GetDisplayIndex(columns, "SYRate"), Color.Aquamarine);
            ColumnGroupHeader csh6  = GetHeader(columns, "釉缕", GetDisplayIndex(columns, "YoLQty"), GetDisplayIndex(columns, "YoLRate"), Color.Aquamarine);
            ColumnGroupHeader csh7  = GetHeader(columns, "毛孔", GetDisplayIndex(columns, "MKQty"), GetDisplayIndex(columns, "MKRate"), Color.Aquamarine);
            ColumnGroupHeader csh8  = GetHeader(columns, "落渣", GetDisplayIndex(columns, "LZQty"), GetDisplayIndex(columns, "LZRate"), Color.Aquamarine);
            ColumnGroupHeader csh9  = GetHeader(columns, "粘疤", GetDisplayIndex(columns, "NBQty"), GetDisplayIndex(columns, "NBRate"), Color.Aquamarine);
            ColumnGroupHeader csh10 = GetHeader(columns, "粘渣脚", GetDisplayIndex(columns, "NZJQty"), GetDisplayIndex(columns, "NZJRate"), Color.Aquamarine);
            ColumnGroupHeader csh11 = GetHeader(columns, "伤裂", GetDisplayIndex(columns, "SLQty"), GetDisplayIndex(columns, "SLRate"), Color.Aquamarine);
            ColumnGroupHeader csh12 = GetHeader(columns, "薄釉", GetDisplayIndex(columns, "BOUQty"), GetDisplayIndex(columns, "BOURate"), Color.Aquamarine);
            ColumnGroupHeader csh13 = GetHeader(columns, "其他", GetDisplayIndex(columns, "YCQTQty"), GetDisplayIndex(columns, "YCQTRate"), Color.Aquamarine);
            ColumnGroupHeader csh14 = GetHeader(columns, "小计", GetDisplayIndex(columns, "sumQty3"), GetDisplayIndex(columns, "sumRate3"), Color.Aquamarine);

            cgh.GroupHeaders.Add(csh1);
            cgh.GroupHeaders.Add(csh2);
            cgh.GroupHeaders.Add(csh3);
            cgh.GroupHeaders.Add(csh4);
            cgh.GroupHeaders.Add(csh5);
            cgh.GroupHeaders.Add(csh6);
            cgh.GroupHeaders.Add(csh7);
            cgh.GroupHeaders.Add(csh8);
            cgh.GroupHeaders.Add(csh9);
            cgh.GroupHeaders.Add(csh10);
            cgh.GroupHeaders.Add(csh11);
            cgh.GroupHeaders.Add(csh12);
            cgh.GroupHeaders.Add(csh13);
            cgh.GroupHeaders.Add(csh14);
            // We want the header to also contain the 'City' column
            // so we must include it in the display range.

            cgh.StartDisplayIndex = GetDisplayIndex(columns, "SBJQty");
            cgh.EndDisplayIndex   = GetDisplayIndex(columns, "sumRate3");
            return(cgh);
        }
Esempio n. 6
0
        /// <summary>
        /// 合并列方法
        /// </summary>
        /// <returns></returns>
        private ColumnGroupHeader GetSlCompanyInfoHeader(GridColumnCollection columns, string
                                                         name, string headerText, string startName, string endName)
        {
            ColumnGroupHeader cgh = new ColumnGroupHeader();

            cgh.Name       = name;
            cgh.HeaderText = headerText;

            cgh.MinRowHeight = 36;

            cgh.StartDisplayIndex = GetDisplayIndex(columns, startName);
            cgh.EndDisplayIndex   = GetDisplayIndex(columns, endName);

            //superGridControl1.PrimaryGrid
            return(cgh);
        }
Esempio n. 7
0
        private ColumnGroupHeader GetWXHeader(GridColumnCollection columns)
        {
            ColumnGroupHeader cgh = new ColumnGroupHeader();

            cgh.Name       = "NX";
            cgh.HeaderText = "内销";

            //cgh.HeaderStyles.Default.Background = new Background(Color.Goldenrod, Color.Yellow, BackFillType.HorizontalCenter);
            cgh.HeaderStyles.MouseOver.Background = new Background(Color.Yellow);
            cgh.HeaderStyles.Default.Background   = new Background(Color.LightYellow);
            cgh.MinRowHeight = 36;

            // Set the group's start and end display indicees

            cgh.StartDisplayIndex = GetDisplayIndex(columns, "NXQty");
            cgh.EndDisplayIndex   = GetDisplayIndex(columns, "NXRATE");

            return(cgh);
        }
Esempio n. 8
0
        private ColumnGroupHeader GetHeader(GridColumnCollection columns, string headertext, int p1, int p2, Color color)
        {
            ColumnGroupHeader cgh = new ColumnGroupHeader();

            cgh.Name       = "ch" + headertext;
            cgh.HeaderText = headertext;

            //cgh.HeaderStyles.Default.Background = new Background(Color.Goldenrod, Color.Yellow, BackFillType.HorizontalCenter);
            cgh.HeaderStyles.MouseOver.Background = new Background(Color.Yellow);
            cgh.HeaderStyles.Default.Background   = new Background(color);
            cgh.MinRowHeight = 28;

            // Set the group's start and end display indicees

            cgh.StartDisplayIndex = p1;
            cgh.EndDisplayIndex   = p2;

            return(cgh);
        }
Esempio n. 9
0
        private ColumnGroupHeader GetSingleInfoHeader(string fieldname, string headertext, GridColumnCollection columns)
        {
            ColumnGroupHeader cgh = new ColumnGroupHeader();

            cgh.Name       = fieldname;
            cgh.HeaderText = headertext;
            // Set the header to not show the root column headers, and
            // perform some misc Style/display related setup.

            cgh.ShowColumnHeaders = Tbool.False;
            cgh.MinRowHeight      = 36;

            //cgh.HeaderStyles.Default.Image = imageList1.Images["Cog"];
            cgh.HeaderStyles.Default.ImageAlignment = Alignment.MiddleCenter;
            cgh.HeaderStyles.Default.Background     = new Background(Color.LightBlue, Color.CadetBlue);
            cgh.HeaderStyles.MouseOver.Background   = new Background(Color.CadetBlue, Color.LightBlue);

            // Set the header's start and end Display Indecees

            cgh.StartDisplayIndex = GetDisplayIndex(columns, fieldname);
            cgh.EndDisplayIndex   = GetDisplayIndex(columns, fieldname);
            return(cgh);
        }
Esempio n. 10
0
        private ColumnGroupHeader GetFireHeader(GridColumnCollection columns)
        {
            ColumnGroupHeader cgh = new ColumnGroupHeader();

            //cgh.Name = "LevelB";
            cgh.MinRowHeight = 28;


            cgh.EnableHeaderMarkup = true;

            cgh.HeaderText = "<div align=\"center\"><font size=\"12\">看火缺陷</font> </div>";

            cgh.HeaderStyles.MouseOver.Background = new Background(Color.Gold);
            cgh.HeaderStyles.Default.Background   = new Background(Color.Gold);

            // Create and add the subordinate group headers

            ColumnGroupHeader csh1 = GetHeader(columns, "欠火", GetDisplayIndex(columns, "QHQty"), GetDisplayIndex(columns, "QHRate"), Color.Gold);
            ColumnGroupHeader csh2 = GetHeader(columns, "过火", GetDisplayIndex(columns, "GHQTY"), GetDisplayIndex(columns, "GHRate"), Color.Gold);
            ColumnGroupHeader csh3 = GetHeader(columns, "釉泡", GetDisplayIndex(columns, "YPQty"), GetDisplayIndex(columns, "YPRate"), Color.Gold);
            ColumnGroupHeader csh4 = GetHeader(columns, "出损", GetDisplayIndex(columns, "CSQty"), GetDisplayIndex(columns, "CSRate"), Color.Gold);
            ColumnGroupHeader csh5 = GetHeader(columns, "其他", GetDisplayIndex(columns, "KHQTQty"), GetDisplayIndex(columns, "KHQTRate"), Color.Gold);
            ColumnGroupHeader csh6 = GetHeader(columns, "小计", GetDisplayIndex(columns, "sumQty4"), GetDisplayIndex(columns, "sumRate4"), Color.Gold);

            cgh.GroupHeaders.Add(csh1);
            cgh.GroupHeaders.Add(csh2);
            cgh.GroupHeaders.Add(csh3);
            cgh.GroupHeaders.Add(csh4);
            cgh.GroupHeaders.Add(csh5);
            cgh.GroupHeaders.Add(csh6);
            // We want the header to also contain the 'City' column
            // so we must include it in the display range.

            cgh.StartDisplayIndex = GetDisplayIndex(columns, "QHQty");
            cgh.EndDisplayIndex   = GetDisplayIndex(columns, "sumRate4");
            return(cgh);
        }