Example #1
0
        void Btn_AddNewBox_Click(object sender, EventArgs args)
        {
            Frm_BoxEdit frm = new Frm_BoxEdit();

            frm.ShowDialog();
            UpdateBoxes();
        }
        void Btn_New_Click(object sender, EventArgs e)
        {
            Frm_BoxEdit frm        = new Frm_BoxEdit();
            int         NEW_Box_ID = frm.ShowNewDialog();

            frm.Dispose();
            FillCBox(Cbox_Box, "SELECT box_id FROM box", "box_id", "box_id");
            Cbox_Box.SelectedValue = NEW_Box_ID;
        }
Example #3
0
 void Btn_ModBox_Click(object sender, EventArgs e)
 {
     if (DGV_Boxes.SelectedRows.Count > 0)
     {
         Frm_BoxEdit frm = new Frm_BoxEdit(int.Parse(DGV_Boxes.SelectedRows[0].Cells[0].Value.ToString()));
         frm.ShowDialog();
         UpdateBoxes();
     }
     else
     {
         MessageBox.Show("Please select a box!");
     }
 }