예제 #1
0
 private void OnButtonSearch()
 {
     MakeEmptyDetail();
     if (chk_DoanKhach.Checked == true)
     {
         Form_TimKiemVaChonDoanKhach frm = new Form_TimKiemVaChonDoanKhach();
         dtRowTemp = frm.ShowModal();
         if (dtRowTemp != null)
         {
             txt_MaDoanKhach.Properties.Mask.UseMaskAsDisplayFormat = true;
             txt_MaDoanKhach.Text     = dtRowTemp["Ma_DOAN_KHACH"].ToString();
             cbo_CongTy.SelectedValue = dtRowTemp["Ma_CONG_TY"].ToString();
             LoadGridByDoanKhach(int.Parse(txt_MaDoanKhach.EditValue.ToString()));
         }
     }
     else
     {
         Form_TimKiemVaChonKhachHang frm = new Form_TimKiemVaChonKhachHang();
         dtRowTemp = frm.ShowModal();
         if (dtRowTemp != null)
         {
             txt_MaKhachHang.Properties.Mask.UseMaskAsDisplayFormat = true;
             txt_MaKhachHang.Text  = dtRowTemp["Ma_KHACH_HANG"].ToString();
             txt_TenKhachHang.Text = dtRowTemp["TEN_KHACH_HANG"].ToString();
             LoadGridByKhachHang(int.Parse(txt_MaKhachHang.EditValue.ToString()));
         }
     }
 }
예제 #2
0
 private void OnButtonSearch()
 {
     MakeEmptyDetail();
     if (chk_DoanKhach.Checked == true)
     {
         Form_TimKiemVaChonDoanKhach frm = new Form_TimKiemVaChonDoanKhach();
         dtRowTemp = frm.ShowModal();
         if (dtRowTemp != null)
         {
             txt_MaDoanKhach.Text     = dtRowTemp["MaDK"].ToString();
             cbo_CongTy.SelectedValue = dtRowTemp["MaCT"].ToString();
             LoadGridByDoanKhach(int.Parse(txt_MaDoanKhach.Text.Substring(2)));
         }
     }
     else
     {
         Form_TimKiemVaChonKhachHang frm = new Form_TimKiemVaChonKhachHang();
         dtRowTemp = frm.ShowModal();
         if (dtRowTemp != null)
         {
             txt_MaKhachHang.Text  = dtRowTemp["MaKH"].ToString();
             txt_TenKhachHang.Text = dtRowTemp["TEN_KHACH_HANG"].ToString();
             LoadGridByKhachHang(int.Parse(txt_MaKhachHang.Text.Substring(2)));
         }
     }
 }
예제 #3
0
 private void searchAndSelectCustomerMenuItem_Click(object sender, EventArgs e)
 {
     if (searchAndSelectForm == null || searchAndSelectForm.IsDisposed)
     {
         searchAndSelectForm           = new Form_TimKiemVaChonKhachHang();
         searchAndSelectForm.MdiParent = this;
         searchAndSelectForm.Show();
     }
     else
     {
         searchAndSelectForm.Activate();
     }
 }
예제 #4
0
 private void searchAndSelectCustomerMenuItem_Click(object sender, EventArgs e)
 {
     Form_TimKiemVaChonKhachHang searchAndSelectForm = new Form_TimKiemVaChonKhachHang();
     searchAndSelectForm.MdiParent = this;
     searchAndSelectForm.Show();
 }