Ejemplo n.º 1
0
        private void Start_Click(object sender, EventArgs e)
        {
            AddForm addForm = new AddForm();

            addForm.Show();
            this.Hide();
        }
Ejemplo n.º 2
0
        private void noviKorisnikToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AddForm f = new AddForm();

            f.MdiParent = this;
            f.Show();
        }
Ejemplo n.º 3
0
        private void AddictiveToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AddForm l = new AddForm("addictive");

            l.StartPosition = FormStartPosition.CenterParent;
            l.Show();
        }
Ejemplo n.º 4
0
        private void AddMonsterButton_Click(object sender, EventArgs e)
        {
            AddForm FormAddMonster = new AddForm();

            FormAddMonster.Tag  = "Monsters";
            FormAddMonster.Text = "Add Monsters";
            FormAddMonster.Show();
        }
Ejemplo n.º 5
0
        private void AddPartyButton_Click(object sender, EventArgs e)
        {
            AddForm FormAddParty = new AddForm();

            FormAddParty.Tag  = "Party";
            FormAddParty.Text = "Add Party";
            FormAddParty.Show();
        }
Ejemplo n.º 6
0
        private void add_Click(object sender, EventArgs e)
        {
            AddForm frm = new AddForm()
            {
                Dock = DockStyle.Fill, TopLevel = false, TopMost = true
            };

            showpnl(frm);
            frm.Show();
        }
Ejemplo n.º 7
0
 private void Button_Click_6(object sender, RoutedEventArgs e)
 {
     try
     {
         string     firstSelectedCellContent = ((TextBlock)(this.DgridMedicament.Columns[0].GetCellContent(DgridMedicament.SelectedItem))).Text;
         MEDICAMENT name     = dbContext.MEDICAMENTs.First(m => m.M_NAME == firstSelectedCellContent);
         AddForm    editForm = new AddForm(name, this);
         editForm.Show();
     }
     catch (Exception)
     {
         MessageBox.Show("Выделите строку, которую хотите редактировать");
     }
 }
Ejemplo n.º 8
0
 private void MenuItem_Click_3(object sender, RoutedEventArgs e)
 {
     try
     {
         var firstSelectedCellContent = ((TextBlock)(this.DgridMedicament.Columns[0].GetCellContent(DgridMedicament.SelectedItem))).Text;
         var name     = dbContext.MEDICAMENTs.First(m => m.M_NAME == firstSelectedCellContent);
         var editForm = new AddForm(name, this);
         editForm.Show();
     }
     catch (Exception)
     {
         MessageBox.Show("Выделите объект, который хотите редактировать");
     }
 }
Ejemplo n.º 9
0
 private void DgridMedicament_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     if (MainWindow.access == "Администратор")
     {
         try
         {
             var firstSelectedCellContent = ((TextBlock)(this.DgridMedicament.Columns[0].GetCellContent(DgridMedicament.SelectedItem))).Text;
             var name     = dbContext.MEDICAMENTs.First(m => m.M_NAME == firstSelectedCellContent);
             var editForm = new AddForm(name, this);
             editForm.Show();
         }
         catch (Exception)
         {
             MessageBox.Show("Выделите объект, который хотите редактировать");
         }
     }
 }
Ejemplo n.º 10
0
 private void созданиеToolStripMenuItem_Click(object sender, EventArgs e)
 {
     var form = new AddForm<DoctorDetail>(DIKernel) { MdiParent = this };
     form.InitializeForm();
     form.Show();
 }
Ejemplo n.º 11
0
        private void новыйToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var editForm = new AddForm<ParameterDetail>(DIKernel, -1) { MdiParent = this };

            editForm.InitializeForm();
            editForm.Show();
        }
Ejemplo n.º 12
0
        private void Button_Click_4(object sender, RoutedEventArgs e)
        {
            var addForm = new AddForm(null, this);

            addForm.Show();
        }
Ejemplo n.º 13
0
        private void MenuItem_Click_2(object sender, RoutedEventArgs e)
        {
            var addForm = new AddForm(null, this);

            addForm.Show();
        }
Ejemplo n.º 14
0
        /*public class MainInfo
         * {
         *  public int Id { get; set; }
         *
         *  public string Number { get; set; }
         *
         *  public ComboBox Status { get; set; }
         *
         *  public string Product_name { get; set; }
         *
         *  public string Type { get; set; }
         *
         *  public string Vessel_name { get; set; }
         *
         *  public string Reg_number { get; set; }
         *
         *  public DateTime Plan_date { get; set; }
         *
         *  public DateTime Fact_date { get; set; }
         *
         * }*/

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            AddForm addForm = new AddForm();

            addForm.Show();
        }
Ejemplo n.º 15
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            AddForm addForm = new AddForm();

            addForm.Show();
        }
        private void Init()
        {
            //form
            Width  = 1300;
            Height = 700;
            Font   = new System.Drawing.Font("Arial", 10);
            Name   = EntityData.Name + "_Form";
            Text   = @"" + EntityData.Name + " Form";

            //components
            BtnFilterPagination.Click += (o, e) =>
            {
                try
                {
                    Offset = int.Parse(InputOffset.Text);
                    Limit  = int.Parse(InputLimit.Text);
                    Navigate(Offset, Limit);
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Input tidak valid", "Error");
                    CustomConsole.WriteLine(ex.Message);
                    return;
                }
            };

            Button ClearBtn = new Button()
            {
                Text = "Clear"
            };

            ClearBtn.Click += new EventHandler((o, e) =>
            {
                EntityData.FilterParmas.Clear();
                Navigate(0, 0);
            });

            Control[] FilterControls =
            {
                new Label()
                {
                    Text = "Page(from 0)"
                }, InputOffset,
                new Label()
                {
                    Text = "Record Per Page"
                }, InputLimit,
                BtnFilterPagination, InfoOffsetLimit, new Label()
                {
                    Text = "Filter Info:"
                },
                InfoFilter, new BlankControl()
                {
                    Reserved = ReservedFor.BEFORE_HOR
                },
                new BlankControl()
                {
                    Reserved = ReservedFor.BEFORE_HOR
                },
                ClearBtn
            };
            Panel PagingPanel = ControlUtil.GeneratePanel(6, FilterControls, 0, 110, 30, Color.Azure);

            Controls.Add(PagingPanel);

            Button BtnAdd = new Button()
            {
                Text = "ADD"
            };

            BtnAdd.Click += (o, e) =>
            {
                addForm = new AddForm(EntityData.ShowAddForm(), EntityData);
                addForm.Show();
            };

            MiscPanel = ControlUtil.GeneratePanel(3, new Control[]
            {
                new TitleLabel(13)
                {
                    Text = "Buttons Panel"
                }, BtnAdd
            }, 5, 130, 20, Color.Azure, 850, 10);

            Controls.Add(MiscPanel);

            DetailPanel.SetBounds(850, 130, Constant.DETAIL_PANEL_HEIGHT, Constant.DETAIL_PANEL_WIDTH);
            DetailPanel.AutoScroll             = false;
            DetailPanel.VerticalScroll.Visible = true;
            DetailPanel.VerticalScroll.Enabled = true;
            DetailPanel.AutoScroll             = true;
            Controls.Add(DetailPanel);

            GenerateTable();
        }