private void formLoad() { loadFoodClassButtonList(); foreach (Button item in btnListFoodClass) { item.Visible = false; item.Text = "--"; } LoadUserFlags(); //IEnumerator enumerator1 = this.groupFoodClass.Controls.GetEnumerator(); System.Windows.Forms.Button button; try { string tmp = ""; for (int i = 0; i < parmFoodClass.TypeCodesArray.Count; i++) { //enumerator1.MoveNext(); button = btnListFoodClass[i]; button.Text = parmFoodClass.GetLongName(i); tmp = parmFoodClass.GetLongName(i); button.Tag = parmFoodClass.GetId(tmp).ToString(); button.Visible = true; } clsFoodDonations.OpenWhere("DonorId = " + donorID + " AND TrxDate > DATEADD(dd,-90,GETDATE())"); } catch (Exception ex) { CCFBGlobal.appendErrorToErrorReport("", ex.GetBaseException().ToString()); } }
private void formLoad() { IEnumerator enumerator = this.tabPage2.Controls.GetEnumerator(); IEnumerator enumerator1 = this.tabPage1.Controls.GetEnumerator(); clsFoodDonations.getFavorite(); System.Windows.Forms.Button button; try { for (int i = 0; i < clsFoodDonations.RowCount; i++) { enumerator.MoveNext(); button = (System.Windows.Forms.Button)enumerator.Current; button.Text = clsFoodDonations.DSet.Tables["FoodDonations"].Rows[i][1].ToString(); button.Name = clsFoodDonations.DSet.Tables["FoodDonations"].Rows[i][0].ToString(); } for (int j = 0; j < this.tabPage2.Controls.Count; j++) { enumerator.MoveNext(); button = (System.Windows.Forms.Button)enumerator.Current; if (button.Text == "") { button.Hide(); } } for (int i = 0; i < parmDonorTypeCode.TypeCodesArray.Count; i++) { enumerator1.MoveNext(); button = (System.Windows.Forms.Button)enumerator1.Current; button.Text = parmDonorTypeCode.GetLongName(i); string tmp = parmDonorTypeCode.GetLongName(i); button.Name = parmDonorTypeCode.GetId(tmp).ToString(); } for (int j = 0; j < this.tabPage1.Controls.Count; j++) { enumerator1.MoveNext(); button = (System.Windows.Forms.Button)enumerator1.Current; if (button.Text == "") { button.Hide(); } } } catch (Exception ex) { CCFBGlobal.appendErrorToErrorReport("", ex.GetBaseException().ToString()); } }
private void formLoad() { IEnumerator enumerator1 = this.groupBox2.Controls.GetEnumerator(); System.Windows.Forms.Button button; try { for (int i = 0; i < parmFoodClass.TypeCodesArray.Count; i++) { enumerator1.MoveNext(); button = (System.Windows.Forms.Button)enumerator1.Current; button.Text = parmFoodClass.GetLongName(i); string tmp = parmFoodClass.GetLongName(i); button.Name = parmFoodClass.GetId(tmp).ToString(); FoodCodeSelected = button.Text; } clsFoodDonations.openAll(); } catch (Exception ex) { CCFBGlobal.appendErrorToErrorReport("", ex.GetBaseException().ToString()); } }