Beispiel #1
0
 public long AddApplication(ApplicationObject importApplication)
 {
     try
     {
         return(_importApplicationManager.AddApplication(importApplication));
     }
     catch (Exception ex)
     {
         ErrorLogger.LoggError(ex.StackTrace, ex.Source, ex.Message);
         return(0);
     }
 }
Beispiel #2
0
        public void AddApplication(ApplicationViewModel applicationViewModel)
        {
            try
            {
                tbl_Applications tblApplication = new tbl_Applications();
                tblApplication.ApplicationName = applicationViewModel.ApplicationName;
                tblApplication.ProjectId       = applicationViewModel.ProjectID;
                tblApplication.AppVersion      = applicationViewModel.AppVersionId;
                tblApplication.BankType        = applicationViewModel.BankType;

                tblApplication.EntityState = DA.DomainModel.EntityState.Added;

                ApplicationManager applicationManager = new ApplicationManager();
                applicationManager.AddApplication(tblApplication);
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #3
0
        private bool Save()
        {
            if (!IsValid())
            {
                return(false);
            }

            // If the user selected an existing application, populate class properties and exit
            if (((ApplicationItemType)cmbExistingApplication.SelectedIndex) != ApplicationItemType.NewApplication)
            {
                // Set existing application
                _SelectedApplication = (IApplication)cmbExistingApplication.SelectedItem;
            }
            else
            {
                _SelectedApplication = new UserApplication();
                ApplicationManager.AddApplication(_SelectedApplication);
            }

            // Store application name
            _SelectedApplication.Name = txtApplicationName.Text;

            if (SelectedTab == TabType.Running)
            {
                _SelectedApplication.MatchString = alvRunningApplications.MatchString;
                _SelectedApplication.MatchUsing  = alvRunningApplications.MatchUsing;
                _SelectedApplication.IsRegEx     = false;
            }
            else
            {
                _SelectedApplication.MatchString = txtMatchString.Text.Trim();
                _SelectedApplication.MatchUsing  = (MatchUsing)cmbMatchUsingCustom.SelectedIndex;
                _SelectedApplication.IsRegEx     = chkRegex.Checked;
            }

            ApplicationManager.SaveApplications();

            return(true);
        }