/// <summary> /// Initialize instance of Roles tabbed document. /// </summary> /// <param name="project">string: Project name.</param> public Roles(MainForm parent, string project) { if (project.Length == 0) throw new System.ArgumentNullException("You must provide a valid project name."); _ParentForm = parent; projectName = project; this.Text = project + " - [Roles]"; // Initialize components InitializeComponent(); dataTable = new iCampaign.TACS.Data.RolesDs.RolesDataTable(); tableAdapter = new iCampaign.TACS.Data.RolesDsTableAdapters.RolesTableAdapter(); tableAdapter.Connection = new System.Data.SqlClient.SqlConnection(TacsSession.ConnectionString); GetRecord(); }
/// <summary> /// Initialize instance of the project tabbed document. /// </summary> /// <param name="parent">MainForm: object.</param> /// <param name="aid">long: Account id.</param> public Project(MainForm parent, long aid) { // Initialize properties acctId = aid; _ParentForm = parent; dataTable = new iCampaign.TACS.Data.ProjectsDs.ProjectsDataTable(); tableAdapter = new iCampaign.TACS.Data.ProjectsDsTableAdapters.ProjectsTableAdapter(); tableAdapter.Connection = new System.Data.SqlClient.SqlConnection(TacsSession.ConnectionString); appTable = new iCampaign.TACS.Data.ApplicationsDs.ApplicationsDataTable(); appTableAdapter = new iCampaign.TACS.Data.ApplicationsDsTableAdapters.ApplicationsTableAdapter(); appTableAdapter.Connection = new System.Data.SqlClient.SqlConnection(TacsSession.ConnectionString); roleTable = new iCampaign.TACS.Data.RolesDs.RolesDataTable(); roleAdapter = new iCampaign.TACS.Data.RolesDsTableAdapters.RolesTableAdapter(); roleAdapter.Connection = new System.Data.SqlClient.SqlConnection(TacsSession.ConnectionString); // Initialize tabbed document controls InitializeComponent(); InitializeDocument(); }
/// <summary> /// Initialize instance of the project tabbed document. /// </summary> /// <param name="parent">MainForm: object.</param> /// <param name="proj">string: Project name.</param> public Project(MainForm parent, long aid, string proj) { // Check the arguments if (proj.Length == 0) { throw new System.ArgumentException("You must provide an project name value."); } else { project = proj; acctId = aid; } // Initialize properties _ParentForm = parent; dataTable = new iCampaign.TACS.Data.ProjectsDs.ProjectsDataTable(); tableAdapter = new iCampaign.TACS.Data.ProjectsDsTableAdapters.ProjectsTableAdapter(); tableAdapter.Connection = new System.Data.SqlClient.SqlConnection(TacsSession.ConnectionString); appTable = new iCampaign.TACS.Data.ApplicationsDs.ApplicationsDataTable(); appTableAdapter = new iCampaign.TACS.Data.ApplicationsDsTableAdapters.ApplicationsTableAdapter(); appTableAdapter.Connection = new System.Data.SqlClient.SqlConnection(TacsSession.ConnectionString); roleTable = new iCampaign.TACS.Data.RolesDs.RolesDataTable(); roleAdapter = new iCampaign.TACS.Data.RolesDsTableAdapters.RolesTableAdapter(); roleAdapter.Connection = new System.Data.SqlClient.SqlConnection(TacsSession.ConnectionString); // Initialize tabbed document controls InitializeComponent(); InitializeDocument(); GetRecord(); }