Esempio n. 1
0
 private void frmHopdong_Load(object sender, EventArgs e)
 {
     DAO.OpenConnection();
     cmbManha.DropDownStyle           = System.Windows.Forms.ComboBoxStyle.DropDownList;
     cmbMakhach.DropDownStyle         = System.Windows.Forms.ComboBoxStyle.DropDownList;
     cmbManha.SelectedIndex           = -1;
     cmbMakhach.SelectedIndex         = -1;
     cmbManha.SelectedIndexChanged   += cmbManha_SelectedIndexChanged;
     cmbMakhach.SelectedIndexChanged += cmbMakhach_SelectedIndexChanged;
     txtMahopdong.Text = DAO.CreateKey("HDTN");
     DAO.CloseConnection();
     fillDataToComboMakhach();
     fillDataToComboManha();
     cmbManha.SelectedIndex = -1;
 }
Esempio n. 2
0
 private void btnTaomoi_Click(object sender, EventArgs e)
 {
     txtMahopdong.Text         = DAO.CreateKey("HDTN");
     cmbManha.SelectedIndex    = -1;
     cmbMakhach.SelectedIndex  = -1;
     txtTenchunha.Text         = "";
     txtDienthoai.Text         = "";
     txtTenkhach.Text          = "";
     txtDiachithuongtru.Text   = "";
     txtSoCMND.Text            = "";
     txtDiachinha.Text         = "";
     txtDongiathue.Text        = "";
     txtLoainha.Text           = "";
     txtDoituongsudung.Text    = "";
     txtMucdichsudung.Text     = "";
     txtNgayBD.Text            = "";
     txtNgayKT.Text            = "";
     txtTinhtrang.Text         = "";
     txtGhichu.Text            = "";
     txtHinhthucthanhtoan.Text = "";
 }