示例#1
0
 public ApplicationForm(ref DBConnection dbconn)
 {
     InitializeComponent();
     this.dbconn = dbconn;
     DBLabsDLL.DBConnectionBase dbconn2 = this.dbconn;
     DBLabsDLL.LoginForm login =new DBLabsDLL.LoginForm(ref dbconn2);
     login.ShowDialog();
     addStudentControl1.AddStudentControlSettings(ref dbconn);
     addStudentControl1.Visible = false;
     viewStudentControl1.ViewStudentControlSettings(ref dbconn2);
     viewStudentControl1.Visible = false;
     addCourseControl1.AddCourseControlSettings(ref dbconn2);
     addCourseControl1.Visible = false;
     viewCourseControl1.ViewCourseControlSettings(ref dbconn2);
     viewCourseControl1.Visible = false;
     staffGridControl1.StaffGridControlSettings(ref dbconn2);
     staffGridControl1.Visible = false;
 }
 public ApplicationForm(ref DBConnection dbconn)
 {
     InitializeComponent();
     this.dbconn = dbconn;
     DBLabsDLL.DBConnectionBase dbconn2 = this.dbconn;
     DBLabsDLL.LoginForm        login   = new DBLabsDLL.LoginForm(ref dbconn2);
     login.ShowDialog();
     addStudentControl1.AddStudentControlSettings(ref dbconn);
     addStudentControl1.Visible = false;
     viewStudentControl1.ViewStudentControlSettings(ref dbconn2);
     viewStudentControl1.Visible = false;
     addCourseControl1.AddCourseControlSettings(ref dbconn2);
     addCourseControl1.Visible = false;
     viewCourseControl1.ViewCourseControlSettings(ref dbconn2);
     viewCourseControl1.Visible = false;
     staffGridControl1.StaffGridControlSettings(ref dbconn2);
     staffGridControl1.Visible = false;
 }