예제 #1
0
        private void LoadPumpType()
        {
            cmbPump.Items.Clear();
            IList list = PumpTypeData.LoadPumpType();

            foreach (Object o in list)
            {
                PumpType pt = (PumpType)o;
                cmbPump.Items.Add(pt.TypeName);
            }

            cmbPump.SelectedIndex = 0;
        }
예제 #2
0
        private void button1_Click(object sender, System.EventArgs e)
        {
            CommonAdd ca = new CommonAdd();

            if (ca.ShowDialog() == DialogResult.OK)
            {
                PumpType pt = new PumpType();
                pt.TypeName = ca.InputType;

                PumpTypeData.InsertPumpType(pt);
                LoadData();
            }
        }