///<summary></summary> public static void MoveDown(CovCat covcat) { CovCats.Refresh(); int oldOrder = CovCatB.GetOrderLong(covcat.CovCatNum); if (oldOrder == CovCatB.Listt.Length - 1) { return; } SetOrder(CovCatB.Listt[oldOrder], oldOrder + 1); SetOrder(CovCatB.Listt[oldOrder + 1], oldOrder); }
///<summary></summary> public static void MoveUp(CovCat covcat) { CovCats.Refresh(); int oldOrder = CovCatB.GetOrderLong(covcat.CovCatNum); if (oldOrder == 0) { return; } SetOrder(CovCatB.Listt[oldOrder], oldOrder - 1); SetOrder(CovCatB.Listt[oldOrder - 1], oldOrder); }
private void FillSpans() { CovCats.Refresh(); CovSpans.Refresh(); gridMain.BeginUpdate(); gridMain.Columns.Clear(); ODGridColumn col = new ODGridColumn("Category", 90); gridMain.Columns.Add(col); col = new ODGridColumn("From ADA", 70); gridMain.Columns.Add(col); col = new ODGridColumn("To ADA", 70); gridMain.Columns.Add(col); col = new ODGridColumn("Hidden", 45); gridMain.Columns.Add(col); col = new ODGridColumn("E-Benefit Category", 100); gridMain.Columns.Add(col); gridMain.Rows.Clear(); ODGridRow row; CovSpan[] spansForCat; for (int i = 0; i < CovCatB.Listt.Length; i++) { row = new ODGridRow(); row.Tag = CovCatB.Listt[i].Copy(); row.ColorBackG = Color.FromArgb(225, 225, 225); if (i != 0) { gridMain.Rows[gridMain.Rows.Count - 1].ColorLborder = Color.Black; } row.Cells.Add(CovCatB.Listt[i].Description); row.Cells.Add(""); row.Cells.Add(""); if (CovCatB.Listt[i].IsHidden) { row.Cells.Add("X"); } else { row.Cells.Add(""); } if (CovCatB.Listt[i].EbenefitCat == EbenefitCategory.None) { row.Cells.Add(""); } else { row.Cells.Add(CovCatB.Listt[i].EbenefitCat.ToString()); } gridMain.Rows.Add(row); spansForCat = CovSpans.GetForCat(CovCatB.Listt[i].CovCatNum); for (int j = 0; j < spansForCat.Length; j++) { row = new ODGridRow(); row.Tag = spansForCat[j].Copy(); row.Cells.Add(""); row.Cells.Add(spansForCat[j].FromCode); row.Cells.Add(spansForCat[j].ToCode); row.Cells.Add(""); row.Cells.Add(""); gridMain.Rows.Add(row); } } gridMain.EndUpdate(); }