Beispiel #1
0
 private void Initialize()
 {
     try
     {
         project = new Project(Common.Core.ConnectionString);                 
         SetControlListingAccessRights();                                   
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #2
0
        private void Initialize()
        {
            try
            {
                project = new BTSS.Logic.Project(Common.Core.ConnectionString);
                Validation = new BTSS.Common.Validation();
                Validation.Validate(this);
 
                if (Operation == Common.Core.Operation.INSERT)
                { 
                    radioButtonMSAccess.Checked = true; 
                }
                else if (Operation == Common.Core.Operation.UPDATE || Operation == Common.Core.Operation.VIEW)
                { 
                    Logic.GetProjectDetailsResult result = project.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 == Common.Core.Operation.VIEW)
                    {
                        userControlButtonsSave.Visible = false;
                        Lock();
                    }
                }

                textBoxName.Focus();
            }
            catch (Exception)
            {
                throw;
            }
        }