private void projectListToolStripMenuItem_Click(object sender, EventArgs e) { try { ClassProject classProject = new ClassProject(Global.ConnectionString); DataTable dt = new DataTable(); dt = classProject.GetProjectListForReport(); using (var classReportViewer = new ClassReportViewer()) { classReportViewer.ReportTitle = "Project List"; classReportViewer.XMLName = "ProjectList"; classReportViewer.ReportSource = (new Biztech.Reports.ReportProjectList()); classReportViewer.SetDatasource(dt); classReportViewer.ShowReport(); } } catch (Exception) { throw; } }
private void Initialize() { try { classProject = new ClassProject(Global.ConnectionString); } catch (Exception) { throw; } }
private void Initialize() { try { classProject = new ClassProject(Global.ConnectionString); Validation = new Validation(); Validation.Validate(this); if (Operation == Global.Operation.INSERT) { radioButtonMSAccess.Checked = true; } else if (Operation == Global.Operation.UPDATE || Operation == Global.Operation.VIEW) { GetProjectDetailsResult result = classProject.GetProjectDetails(ProjectId); textBoxID.Text = ProjectId; textBoxName.Text = result.Name; textBoxDesription.Text = result.Desc; checkBoxIsActive.Checked = result.IsActive.Value; textBoxVersion.Text = result.Version; textBoxSharepointURL.Text = result.SharepointURL; textBoxErrorLogPath.Text = result.PathErrorLog; textBoxBusinessOwner.Text = result.BusinessOwner; textBoxTester.Text = result.Tester; textBoxOtherContact.Text = result.OtherContact; checkBoxOtherDetails.Checked = result.HasOtherDetails.Value; textBoxSQLDatasource.Text = result.Datasource; textBoxSQLDatabaseName.Text = result.DatabaseName; textBoxSQLUserId.Text = result.UserID; textBoxSQLPassword.Text = result.Password; textBoxFileMDB.Text = result.File; checkBoxAllowDevelopmentMode.Checked = result.EnableBypassKey.Value; checkBoxAllowDevelopmentMode.Tag = result.EnableBypassKey.Value; textBoxFileMDW.Text = result.MDW; textBoxAccessUserID.Text = result.UserID; textBoxAccessPassword.Text = result.Password; if (result.Provider == "OLEDB") { radioButtonMSAccess.Checked = true; } else //SQL { radioButtonSQL.Checked = true; } if (Operation == Global.Operation.VIEW) { userControlButtonsSave.Visible = false; Lock(); } } textBoxName.Focus(); } catch (Exception) { throw; } }