Beispiel #1
0
 private void button2_Click(object sender, EventArgs e)
 {
     try
     {
         if (textEdit1.Text.Trim() == "" || textEdit2.Text.Trim() == "" || textEdit1.Text == null || textEdit2.Text == null)
         {
             MessageBox.Show("Tên công ty hoặc mã số thuế còn thiếu");
             return;
         }
         else
         {
             textEdit1.Text = DataUtil.xoaKhoangTrang(textEdit1.Text);
             textEdit2.Text = DataUtil.xoaKhoangTrang(textEdit2.Text);
         }
         String tenconty = textEdit1.Text;
         string masothue = textEdit2.Text;
         GetListCTHD();
         DataUtil.AddHoaDonDo(DataUtil.username, DateTime.Today, macthd, mahd, textEdit1.Text, textEdit2.Text);
         MessageBox.Show("Đã xuất hóa đơn");
         this.Close();
     }
     catch
     {
         MessageBox.Show("Xuất hóa đơn thất bại");
     }
 }