예제 #1
0
 public Consumption(VIPManagement v)
 {
     InitializeComponent();
     gt                = new GoodsType();
     textBox1.Text     = v.VipCard;
     textBox2.Text     = v.UserName;
     textBox3.Text     = v.VipType;
     textBox4.Text     = v.Balance.ToString();
     textBox5.Text     = v.PhoneNumber;
     groupBox1.Enabled = false;
     sp                = new ShoppingCart(v);
 }
예제 #2
0
        /// <summary>
        /// 确定
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            GoodsType gt   = new GoodsType();
            Goods     good = new Goods();

            good.GoodName  = textBox1.Text;
            good.GoodPrice = (int)numericUpDown1.Value;
            switch (type)
            {
            case "新增":
                gt.AddGoods(good);
                break;

            case "修改":
                gt.EditGoods(good);
                break;

            default:
                break;
            }
            this.DialogResult = DialogResult.OK;
        }
예제 #3
0
 public Part()
 {
     InitializeComponent();
     GT = new GoodsType();
 }