示例#1
0
 private void buttonThem_Click(object sender, EventArgs e)
 {
     try
     {
         PhieuXuat px = new PhieuXuat()
         {
             maPX     = textBoxMaPX.Text,
             ngayXuat = dateTimeNX.Value,
             tongTien = decimal.Parse(textBoxTT.Text)
         };
         db.PhieuXuats.Add(px);
         db.SaveChanges();
         MessageBox.Show("Them thanh cong!!!");
         FormXuat_Load(sender, e);
         FormCTXuat.MaPX = textBoxMaPX.Text;
         if (MessageBox.Show("Vui long them chi tiet phieu xuat!!", "Thông báo", MessageBoxButtons.YesNo)
             == System.Windows.Forms.DialogResult.Yes)
         {
             FormCTXuat ctpn = new FormCTXuat();
             this.Hide();
             ctpn.ShowDialog();
             this.Show();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            FormCTXuat hh = new FormCTXuat();

            this.Hide();
            hh.ShowDialog();
            this.Show();
        }
示例#3
0
 private void buttonCT_Click(object sender, EventArgs e)
 {
     if (MaPX == "")
     {
         MessageBox.Show("Chon phieu xuat truoc!", "Thông báo");
     }
     else
     {
         FormCTXuat ctx = new FormCTXuat();
         FormCTXuat.MaPX = MaPX;
         this.Hide();
         ctx.ShowDialog();
         this.Show();
     }
 }