private void LoadMe() { FeeServiceClient feeService = new FeeServiceClient(); ExistingFees = new List<Fee>(feeService.GetAllFees()); gradeLevels = new List<GradeLevel>(feeService.GetAllGradeLevels()); schoolYears = new List<SchoolYear>(feeService.GetLastFiveSY()); cmbGradeLevel.DataSource = gradeLevels; cmbGradeLevel.ValueMember = "GradeLev"; cmbGradeLevel.DisplayMember = "Description"; cmbSY.DataSource = schoolYears; cmbSY.ValueMember = "SY"; cmbSY.DisplayMember = "SY"; txtAmount.Text ="0.00"; txtDescription.Text = String.Empty; txtDiscount.Text = "0"; txtNumPay.Text = "1"; }
public void LoadStudentFees() { FeeServiceClient feeService = new FeeServiceClient(); string message = String.Empty; try { var fees = feeService.GetAllFees(); feeList = new List<Fee>(fees); gvFees.DataSource = feeList; gvFees.Refresh(); if (gvFees.RowCount != 0) gvFees.Rows[0].IsSelected = true; } catch (Exception ex) { message = "Error Loading Fees List"; MessageBox.Show(ex.ToString()); } }