Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            string                saleId               = textBox1_XSDID.Text;
            string                commodityName        = comboBox1_SPMC.Text;
            string                saleDate             = dateTimePicker1.Text;
            string                str                  = textBox4_XSSL.Text;
            int                   saleNumber           = int.Parse(str);
            string                payMethod            = comboBox2_ZFFS.Text;
            string                workerName           = comboBox1.Text;
            string                Gonghao              = textBox7_GH.Text;
            SaleEntity            entity               = new SaleEntity(saleId, commodityName, saleDate, saleNumber, payMethod, workerName, Gonghao);
            ISaleManageController saleManageController = new SaleManageControllerImpl();

            bool term = saleManageController.InsertSaleInfo(entity);

            if (term == true)
            {
                SalerManage form = new SalerManage();
                MessageBox.Show("添加库存信息成功");
                this.DialogResult = DialogResult.OK;
                this.Hide();
            }
            else
            {
                MessageBox.Show("添加库存信息失败!");
            }
        }
Exemplo n.º 2
0
        public void selectColumn(string column, string table)
        {
            ISaleManageController saleManageController = new SaleManageControllerImpl();
            List <string>         list = saleManageController.SelectColumn(column, table);

            for (int i = 0; i < list.Count; i++)
            {
                string str = list[i];
                this.comboBox1_SPMC.Items.Add(str);
            }
        }