void cmdUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                if (!Utility.isValidGrid(grdList))
                {
                    Utility.ShowMsg("Bạn cần chọn ít nhất một Bệnh nhân để thực hiện xóa đơn thuốc");
                    return;
                }

                objBenhnhan = KcbDanhsachBenhnhan.FetchByID(Utility.Int32Dbnull(grdList.GetValue(KcbDanhsachBenhnhan.Columns.IdBenhnhan)));
                if (objBenhnhan != null)
                    {
                        int Pres_ID = Utility.Int32Dbnull(grdChitiet.GetValue("id_phieu"));
                      if( !isValidPres( Pres_ID)) return;
                        KcbDonthuoc objPrescription = KcbDonthuoc.FetchByID(Pres_ID);
                        if (objPrescription != null)
                        {
                            frm_kedonthuoctaiquay frm = new frm_kedonthuoctaiquay();
                            frm.m_dtPatients = m_dtSearchdata;
                            frm.m_enAct = action.Update;
                            frm._OnPayment += new frm_kedonthuoctaiquay.OnPayment(frm__OnPayment);
                            frm.Noi_tru = 0;
                            frm.objBenhnhan = objBenhnhan;
                            frm.id_kham = -1;
                            frm.txtPres_ID.Text = Utility.sDbnull(objPrescription.IdDonthuoc);
                            frm.CallActionKeDon = CallActionKieuKeDon.TheoDoiTuong;
                            frm.ShowDialog();
                            if (!frm.m_blnCancel)
                            {
                                Utility.GotoNewRowJanus(grdList, KcbDanhsachBenhnhan.Columns.IdBenhnhan,
                                           Utility.sDbnull(frm.objBenhnhan.IdBenhnhan));
                                getData();
                                cmdThanhToan.Focus();
                                ModifyPresCommand();
                            }
                        }
                    }

            }
            catch(Exception ex)
            {
                Utility.CatchException(ex);
            }
        }
        void cmdNew_Click(object sender, EventArgs e)
        {
            try
            {
                // KeDonThuocTheoDoiTuong();
                frm_kedonthuoctaiquay frm = new frm_kedonthuoctaiquay();
                frm.m_enAct = action.Insert;
                frm.m_dtPatients = m_dtSearchdata;
                frm._OnPayment+=new frm_kedonthuoctaiquay.OnPayment(frm__OnPayment);
                frm.objBenhnhan = null;
                frm.id_kham = -1;
                frm.txtPres_ID.Text = "-1";
                frm.Noi_tru = 0;
                frm.CallActionKeDon = CallActionKieuKeDon.TheoDoiTuong;
                frm.ShowDialog();
                if (!frm.m_blnCancel)
                {
                    Utility.GotoNewRowJanus(grdList, KcbDanhsachBenhnhan.Columns.IdBenhnhan,
                                            Utility.sDbnull(frm.objBenhnhan.IdBenhnhan));
                    getData();
                    cmdThanhToan.Focus();
                    ModifyPresCommand();
                }
            }
            catch (Exception exception)
            {
                if (globalVariables.IsAdmin)
                {
                    Utility.CatchException(exception);
                }
            }
            finally
            {

            }
        }