Ejemplo n.º 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.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)));
         }
     }
 }
Ejemplo n.º 2
0
        }//end method Reset

        #endregion //end region Methods


        #region Event Handling Methods

        private void buttonLoadGroup_Click(object sender, EventArgs e)
        {
            Form_TimKiemVaChonDoanKhach findGroup = new Form_TimKiemVaChonDoanKhach();
            DataRow row = findGroup.ShowModal();

            if (row != null)
            {
                LoadData(row);
            } //end if
        }     //end method buttonLoadGroup_Click