예제 #1
0
        private void btnAddNewFacilitator_Click(object sender, EventArgs e)
        {
            frmAddUpdateFacilitator frm = new frmAddUpdateFacilitator();

            frm.CurrentFaclilitator = new Data.Models.Facilitator();

            frm.ShowDialog();

            this.refreshFacilitatorDetils();
        }
예제 #2
0
        private void btnUpdateFacilitator_Click(object sender, EventArgs e)
        {
            frmAddUpdateFacilitator frm = new frmAddUpdateFacilitator();

            frm.CurrentFaclilitator = (Data.Models.Facilitator)facilitatorBindingSource.Current;

            frm.ShowDialog();

            int currentFacilitatorID = ((Data.Models.Facilitator)facilitatorBindingSource.Current).FacilitatorID;

            this.refreshFacilitatorDetils();

            int iCurrentIndex = 0;

            foreach (Data.Models.Facilitator FacilitatorObj in facilitatorBindingSource.List)
            {
                if (FacilitatorObj.FacilitatorID == currentFacilitatorID)
                {
                    facilitatorBindingSource.Position = iCurrentIndex;
                }
                iCurrentIndex++;
            }
        }