private void FormInsSelectSubscr_Load(object sender, System.EventArgs e) { SubList = InsSubs.GetListForSubscriber(Subscriber); List <InsPlan> planList = InsPlans.RefreshForSubList(SubList); //PatPlan[] patPlanArray; string str; InsPlan plan; if (!InsSubs.ValidatePlanNumForList(SubList.Select(x => x.InsSubNum).ToList())) //If !isValid, any links should have been fixed and we now need to update our list. { SubList = InsSubs.GetListForSubscriber(Subscriber); } for (int i = 0; i < SubList.Count; i++) { plan = InsPlans.GetPlan(SubList[i].PlanNum, planList); str = InsPlans.GetCarrierName(SubList[i].PlanNum, planList); if (plan.GroupNum != "") { str += Lan.g(this, " group:") + plan.GroupNum; } int countPatPlans = PatPlans.GetCountBySubNum(SubList[i].InsSubNum); if (countPatPlans == 0) { str += " " + Lan.g(this, "(not in use)"); } listPlans.Items.Add(str); } }
private void FillPlanData() { gridMain.BeginUpdate(); gridMain.Columns.Clear(); ODGridColumn col; //col=new ODGridColumn(Lan.g("TableInsPlans","#"),20); //gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableInsPlans", "Subscriber"), 140); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableInsPlans", "Ins Carrier"), 100); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableInsPlans", "Date Effect."), 90); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableInsPlans", "Date Term."), 90); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableInsPlans", "Used By"), 90); gridMain.Columns.Add(col); gridMain.Rows.Clear(); ODGridRow row; //PatPlan[] patPlanArray; InsPlan plan; for (int i = 0; i < SubList.Count; i++) { row = new ODGridRow(); //row.Cells.Add((i+1).ToString()); row.Cells.Add(FamCur.GetNameInFamLF(SubList[i].Subscriber)); plan = InsPlans.GetPlan(SubList[i].PlanNum, PlanList); row.Cells.Add(Carriers.GetName(plan.CarrierNum)); if (SubList[i].DateEffective.Year < 1880) { row.Cells.Add(""); } else { row.Cells.Add(SubList[i].DateEffective.ToString("d")); } if (SubList[i].DateTerm.Year < 1880) { row.Cells.Add(""); } else { row.Cells.Add(SubList[i].DateTerm.ToString("d")); } int countPatPlans = PatPlans.GetCountBySubNum(SubList[i].InsSubNum); row.Cells.Add(countPatPlans.ToString()); gridMain.Rows.Add(row); } gridMain.EndUpdate(); listRelat.Items.Clear(); for (int i = 0; i < Enum.GetNames(typeof(Relat)).Length; i++) { listRelat.Items.Add(Lan.g("enumRelat", Enum.GetNames(typeof(Relat))[i])); } }
private void FillGrid() { SubList = InsSubs.RefreshForFam(FamCur); if (!InsSubs.ValidatePlanNumForList(SubList.Select(x => x.InsSubNum).ToList())) { SubList = InsSubs.RefreshForFam(FamCur); } PlanList = InsPlans.RefreshForSubList(SubList); gridMain.BeginUpdate(); gridMain.ListGridColumns.Clear(); GridColumn col; //=new ODGridColumn(Lan.g("TableInsPlans","#"),20); //gridMain.Columns.Add(col); col = new GridColumn(Lan.g("TableInsPlans", "Subscriber"), 140); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableInsPlans", "Ins Carrier"), 100); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableInsPlans", "Date Effect."), 90); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableInsPlans", "Date Term."), 90); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableInsPlans", "Used By"), 90); gridMain.ListGridColumns.Add(col); gridMain.ListGridRows.Clear(); GridRow row; //PatPlan[] patPlanArray; InsPlan plan; for (int i = 0; i < SubList.Count; i++) { plan = InsPlans.GetPlan(SubList[i].PlanNum, PlanList); row = new GridRow(); row.Cells.Add(FamCur.GetNameInFamLF(SubList[i].Subscriber)); row.Cells.Add(Carriers.GetName(plan.CarrierNum)); if (SubList[i].DateEffective.Year < 1880) { row.Cells.Add(""); } else { row.Cells.Add(SubList[i].DateEffective.ToString("d")); } if (SubList[i].DateTerm.Year < 1880) { row.Cells.Add(""); } else { row.Cells.Add(SubList[i].DateTerm.ToString("d")); } int countPatPlans = PatPlans.GetCountBySubNum(SubList[i].InsSubNum); row.Cells.Add(countPatPlans.ToString()); gridMain.ListGridRows.Add(row); } gridMain.EndUpdate(); }
private void FormInsSelectSubscr_Load(object sender, System.EventArgs e) { SubList = InsSubs.GetListForSubscriber(Subscriber); List <InsPlan> planList = InsPlans.RefreshForSubList(SubList); //PatPlan[] patPlanArray; string str; InsPlan plan; for (int i = 0; i < SubList.Count; i++) { plan = InsPlans.GetPlan(SubList[i].PlanNum, planList); str = InsPlans.GetCarrierName(SubList[i].PlanNum, planList); if (plan.GroupNum != "") { str += Lan.g(this, " group:") + plan.GroupNum; } int countPatPlans = PatPlans.GetCountBySubNum(SubList[i].InsSubNum); if (countPatPlans == 0) { str += " " + Lan.g(this, "(not in use)"); } listPlans.Items.Add(str); } }