public SalePage(String Name, CruiseWizardView MasterView)
 {
     InitializeComponent();
     this.MasterView = MasterView;
     base.Name       = Name;
     InitializePurposeComboBox();
 }
        //TODO make testable constructor
        public CruiseWizardPresenter(CruiseWizardView View, WindowPresenter windowPresenter, ApplicationControllerBase applicationController, DAL database)
        {
            this.View = View;
            this.WindowPresenter = windowPresenter;
            this.ApplicationController = applicationController;
            View.Presenter = this;
            _database = database;

            LoadSetupData();//load tree defaults, product codes, etc.

            LoadCruiseData();//read data from existing file

            //See if the file contains a template file record
            string templatePath = _database.ReadGlobalValue("CSM", "TemplatePath");

            if (!String.IsNullOrEmpty(templatePath))
            {
                this._fileHasTemplate = true;
                this._templateFile = new FileInfo(templatePath);
                View.SetTemplatePathTextBox(templatePath, false);
            }

            if (this.CuttingUnits.Count == 0)
            {
                this.CuttingUnits.Add(GetNewCuttingUnit());
            }
        }
Exemple #3
0
        //TODO make testable constructor

        public CruiseWizardPresenter(CruiseWizardView View, WindowPresenter windowPresenter, IApplicationController applicationController, DAL database)
        {
            this.View             = View;
            WindowPresenter       = windowPresenter;
            ApplicationController = applicationController;
            View.Presenter        = this;
            _database             = database;

            LoadSetupData();  //load tree defaults, product codes, etc.

            LoadCruiseData(); //read data from existing file

            //See if the file contains a template file record
            var templatePath = _database.ReadGlobalValue("CSM", "TemplatePath");

            if (!String.IsNullOrEmpty(templatePath))
            {
                _fileHasTemplate = true;
                _templateFile    = new FileInfo(templatePath);
                View.SetTemplatePathTextBox(templatePath, false);
            }

            if (CuttingUnits.Count == 0)
            {
                CuttingUnits.Add(GetNewCuttingUnit());
            }
        }
 public SalePage(String Name, CruiseWizardView MasterView)
 {
     InitializeComponent();
     this.MasterView = MasterView;
     base.Name = Name;
     InitializePurposeComboBox();
 }
 public SampleGroupPage(string Name, CruiseWizardView MasterView)
 {
     InitializeComponent();
     base.Name = Name;
     this.MasterView = MasterView;
     BindingNavigatorItemComboBox.ComboBox.DataSource = StratumBindingSource;
     BindingNavigatorItemComboBox.ComboBox.DisplayMember = "Code";
     BindingNavigatorItemComboBox.ComboBox.FormattingEnabled = true;
 }
 public SampleGroupPage(string Name, CruiseWizardView MasterView)
 {
     InitializeComponent();
     base.Name       = Name;
     this.MasterView = MasterView;
     BindingNavigatorItemComboBox.ComboBox.DataSource        = StratumBindingSource;
     BindingNavigatorItemComboBox.ComboBox.DisplayMember     = "Code";
     BindingNavigatorItemComboBox.ComboBox.FormattingEnabled = true;
 }
 public StrataPage(string Name, CruiseWizardView MasterView)
 {
     this.MasterView = MasterView;
     InitializeComponent();
     base.Name = Name;
 }
 public CuttingUnitsPage(String Name, CruiseWizardView MasterView)
 {
     InitializeComponent();
     this.MasterView = MasterView;
     base.Name = Name;
 }
 public StrataPage(string Name, CruiseWizardView MasterView)
 {
     this.MasterView = MasterView;
     InitializeComponent();
     base.Name = Name;
 }
 private bool ShowWizardDialog(DAL database, out SaleDO sale)
 {
     CruiseWizardView view = new CruiseWizardView();
     CruiseWizardPresenter p = new CruiseWizardPresenter(view, this, this.ApplicationController, database);
     DialogResult result = view.ShowDialog((IWin32Window)this.ApplicationController.MainWindow);
     sale = p.Sale;
     if (result == DialogResult.OK)
     {
         return true;
     }
     else
     {
         return false;
     }
 }
Exemple #11
0
 public CuttingUnitsPage(String Name, CruiseWizardView MasterView)
 {
     InitializeComponent();
     this.MasterView = MasterView;
     base.Name       = Name;
 }