Ejemplo n.º 1
0
 private void MenuOpenPO_Click(object sender, EventArgs e)
 {
     try
     {
         ToolStripMenuItem idd10 = sender as ToolStripMenuItem;
         int          id         = Convert.ToInt32(idd10.Name);
         BillDetail   billdetail = new BillDetail(id, userid);
         DialogResult dr         = billdetail.ShowDialog(this);
         if (dr == DialogResult.Cancel)
         {
             billdetail.Close();
         }
         else if (dr == DialogResult.OK)
         {
             billdetail.Close();
         }
     }
     catch (Exception ex)
     { throw ex; }
 }
 private void button2_Click(object sender, EventArgs e)
 {
     if (lblBillID.Text == "" || lblBillID.Text == null)
     {
         MessageBox.Show("Bạn chưa chọn hóa đơn", "Notice!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else
     {
         con = new Connect();
         con.Ghilog("Xem chi tiết hóa đơn xuất số:'" + lblBillID.Text.Trim() + "'", userid1);
         BillDetail billdetail = new BillDetail(Convert.ToInt32(lblBillID.Text), userid1);
         //PrintPreview printbill = new PrintPreview(Convert.ToInt32(lblBillID.Text));
         DialogResult dr = billdetail.ShowDialog(this);
         if (dr == DialogResult.Cancel)
         {
             billdetail.Close();
         }
         else if (dr == DialogResult.OK)
         {
             billdetail.Close();
         }
     }
 }