コード例 #1
0
 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);
         }
     }
 }
コード例 #2
0
 private void btnpicViewCompanyProfile_Click(object sender, EventArgs e)
 {
     if (CurrentlySelectedCompany != null)
     {
         using (ViewEditCompanyDetails frm = new ViewEditCompanyDetails(CurrentlySelectedCompany.CompanyID))
         {
             frm.ShowDialog();
         }
     }
 }
コード例 #3
0
ファイル: MCDMainForm.cs プロジェクト: Speedie007/MCDProject
        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();
        }