Beispiel #1
0
        private void addLogisticButton_Click(object sender, EventArgs e)
        {
            AddLogisticsItemPage addPage = new AddLogisticsItemPage();

            addPage.ShowDialog();

            if (addPage.isConfirm == true)
            {
                string  name        = addPage.name;
                decimal amount      = addPage.amount;
                int     quantity    = addPage.quantity;
                string  description = addPage.description;

                int          logisticId  = eventOrganizerManager.AddLogistic(name, description, amount, quantity, 0, this.eventId);
                ListViewItem newLogistic = new ListViewItem(new[] { name, amount.ToString("F2"), quantity.ToString(), description, "Overall", "0", logisticId.ToString() });
                logisticListView.Items.Add(newLogistic);
                toolStripStatusLabel1.Text = "Logistic item <" + name + "> has been added to the logistics list.";
            }
            logisticButtonDisable();
        }
Beispiel #2
0
        private void editLogisticButton_Click(object sender, EventArgs e)
        {
            ListViewItem         lvi      = logisticListView.SelectedItems[0];
            AddLogisticsItemPage editPage = new AddLogisticsItemPage(lvi.SubItems[0].Text, Convert.ToDecimal(lvi.SubItems[1].Text), Convert.ToInt32(lvi.SubItems[2].Text), lvi.SubItems[3].Text);

            editPage.ShowDialog();

            if (editPage.isConfirm == true)
            {
                string  name        = editPage.name;
                decimal amount      = editPage.amount;
                int     quantity    = editPage.quantity;
                string  description = editPage.description;

                eventOrganizerManager.EditLogistic(name, description, amount, quantity, Convert.ToInt32(lvi.SubItems[5].Text), Convert.ToInt32(lvi.SubItems[6].Text), this.eventId);
                lvi.SubItems[0].Text       = name;
                lvi.SubItems[1].Text       = amount.ToString("F2");
                lvi.SubItems[2].Text       = quantity.ToString();
                lvi.SubItems[3].Text       = description;
                toolStripStatusLabel1.Text = "Details of logistic item <" + name + "> has been editted.";
            }
            taskButtonDisable();
        }
Beispiel #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            AddLogisticsItemPage additem = new AddLogisticsItemPage();

            additem.Show();
        }
Beispiel #4
0
        private void editLogisticButton_Click(object sender, EventArgs e)
        {
            ListViewItem lvi = logisticListView.SelectedItems[0];
            AddLogisticsItemPage editPage = new AddLogisticsItemPage(lvi.SubItems[0].Text, Convert.ToDecimal(lvi.SubItems[1].Text), Convert.ToInt32(lvi.SubItems[2].Text), lvi.SubItems[3].Text);
            editPage.ShowDialog();

            if (editPage.isConfirm == true) {
                string name = editPage.name;
                decimal amount = editPage.amount;
                int quantity = editPage.quantity;
                string description = editPage.description;

                eventOrganizerManager.EditLogistic(name, description, amount, quantity, Convert.ToInt32(lvi.SubItems[5].Text), Convert.ToInt32(lvi.SubItems[6].Text), this.eventId);
                lvi.SubItems[0].Text = name;
                lvi.SubItems[1].Text = amount.ToString("F2");
                lvi.SubItems[2].Text = quantity.ToString();
                lvi.SubItems[3].Text = description;
                toolStripStatusLabel1.Text = "Details of logistic item <" + name + "> has been editted.";
            }
            taskButtonDisable();
        }
Beispiel #5
0
        private void addLogisticButton_Click(object sender, EventArgs e)
        {
            AddLogisticsItemPage addPage = new AddLogisticsItemPage();
            addPage.ShowDialog();

            if (addPage.isConfirm == true) {
                string name = addPage.name;
                decimal amount = addPage.amount;
                int quantity = addPage.quantity;
                string description = addPage.description;

                int logisticId = eventOrganizerManager.AddLogistic(name, description, amount, quantity, 0, this.eventId);
                ListViewItem newLogistic = new ListViewItem(new[] { name, amount.ToString("F2"), quantity.ToString(), description, "Overall", "0", logisticId.ToString() });
                logisticListView.Items.Add(newLogistic);
                toolStripStatusLabel1.Text = "Logistic item <" + name + "> has been added to the logistics list.";
            }
            logisticButtonDisable();
        }
 private void button1_Click(object sender, EventArgs e)
 {
     AddLogisticsItemPage additem = new AddLogisticsItemPage();
     additem.Show();
 }