示例#1
0
 private void hợpĐồngThanhToánToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         conn.Open();
         // command
         SqlDataAdapter dta = new SqlDataAdapter("Select Count (*) From DANGNHAP ", conn);
         DataTable      dtb = new DataTable();
         dta.Fill(dtb);
         if (dtb.Rows[0][0].ToString() == "1")
         {
             this.Hide();
             HDThanhToan tc = new HDThanhToan();
             tc.Show();
         }
         else
         {
             this.Hide();
             DNNV tc = new DNNV();
             tc.Show();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Loi ket noi " + ex.Message, "Thong bao");// thong bao loi
     }
     conn.Close();
 }
示例#2
0
        private void hợpĐồngThanhToánToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Hide();
            HDThanhToan tc = new HDThanhToan();

            tc.Show();
        }