public void Add()
        {
            AddServiceForm serviceForm = new AddServiceForm(this.Package);

            serviceForm.StartPosition = FormStartPosition.CenterParent;
            serviceForm.Completed    += delegate(object sender, ServiceEventArg e)
            {
                ServiceEntity sh = ServiceEntity.CreateNew(e.ServiceName, e.TargetTable, e.Action);
                try
                {
                    this.Package.AddService(sh);
                }
                catch (Exception ex)
                {
                    MessageBox.Show("新增 Service 失敗 : \n" + ex.Message, "失敗", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                TreeNode node = this.Node.Nodes.Add(e.ServiceName);
                node.SelectedImageKey = "service";
                node.ImageKey         = "service";
                node.Tag = new ServiceNodeHandler(node, e.ServiceName, this);
                this.Node.TreeView.SelectedNode = node;
            };
            serviceForm.ShowDialog();
        }
Exemple #2
0
        private void addServiceToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AddServiceForm addServiceForm = new AddServiceForm();

            addServiceForm.Show();
            addServiceForm.MdiParent = this;
        }
Exemple #3
0
        // add additional servide to the DB
        private void addServiceToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var addCompanyServices = new AddServiceForm();

            this.ShowInTaskbar = false;
            addCompanyServices.ShowDialog();
            this.ShowInTaskbar = true;
        }
Exemple #4
0
        private void btnServiceAdd_Click(object sender, EventArgs e)
        {
            //Opens a form for adding service to the database
            AddServiceForm ASF = new AddServiceForm();

            ASF.ShowDialog();
            PopulateDGVService();
        }
Exemple #5
0
        public void AddServiceForVideoWall(IShowServicesForVideoWallView <VideoWall> inForm)
        {
            IAddServiceView addServiceView = new AddServiceForm(this);
            var             videoWall      = _videoWallController.GetVideoWallByLocation(inForm.Location, _videoWallRepository);

            addServiceView.SnoozeVideoWall(videoWall);
            _serviceController.ShowAddService(addServiceView);
        }
Exemple #6
0
        public void ShowAddService()
        {
            IAddServiceView inForm = new AddServiceForm(this);

            _serviceController.ShowAddService(inForm);
        }