private void btnpicREviewUpdateCompanyInfo_Click(object sender, EventArgs e)
 {
     Data.Models.Enrollment EnrollmentObj = (Data.Models.Enrollment)(enrollmentBindingSourceMain.Current);
     if (EnrollmentObj != null)
     {
         Boolean IsCompany = false;
         foreach (StudentAssociatedCompany SAC in EnrollmentObj.StudentEnrollment.Student.StudentAssociatedCompanies)
         {
             if (SAC.IsCurrentCompany)
             {
                 IsCompany = true;
             }
         }
         if (IsCompany)
         {
             using (ViewEditCompanyDetails frm = new ViewEditCompanyDetails(EnrollmentObj.StudentEnrollment.Student.StudentAssociatedCompanies.Where(a => a.IsCurrentCompany == true).FirstOrDefault().Company.CompanyID))
             {
                 //frm.txtCompaniesFilterCriteria.Text = EnrollmentObj.StudentEnrollment.Student.StudentAssociatedCompanies.Where(a => a.IsCurrentCompany == true).FirstOrDefault().Company.CompanyName;
                 frm.ShowDialog();
             }
         }
         else
         {
             MessageBox.Show("Student is private no Company Details Avaiable, Allocate the student to a company by configuring the student details.", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
 }
Exemplo n.º 2
0
 private void btnpicViewCompanyProfile_Click(object sender, EventArgs e)
 {
     if (CurrentlySelectedCompany != null)
     {
         using (ViewEditCompanyDetails frm = new ViewEditCompanyDetails(CurrentlySelectedCompany.CompanyID))
         {
             frm.ShowDialog();
         }
     }
 }