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);
         }
     }
 }
Beispiel #2
0
 private void btnpicViewCompanyProfile_Click(object sender, EventArgs e)
 {
     if (CurrentlySelectedCompany != null)
     {
         using (ViewEditCompanyDetails frm = new ViewEditCompanyDetails(CurrentlySelectedCompany.CompanyID))
         {
             frm.ShowDialog();
         }
     }
 }
Beispiel #3
0
        private void btnCompany_Click(object sender, EventArgs e)
        {
            foreach (Form f in this.MdiChildren)
            {
                if (f.GetType() == typeof(ViewEditCompanyDetails))
                {
                    f.Activate();
                    f.WindowState = FormWindowState.Maximized;
                    return;
                }
            }

            ViewEditCompanyDetails frm = new ViewEditCompanyDetails(0);

            frm.MdiParent = this;
            frm.Show();
        }