Example #1
0
        void RequestToDB_HT_ThongTinBenhNhan()
        {
            if (!setting.HT_ThongTinBN)
            {
                return;
            }

            try
            {
                List <HT_ThongTinNguoiHienTinh> ttnhts = bnhtDB.GetAllNguoiHienTinh();
                foreach (var ttnh in ttnhts)
                {
                    if (bnhtDB.CheckPatientApprove(ttnh.MaBN))
                    {
                        if (ttnh.FlagNeedSync)
                        {
                            var message = new MailMessage(smtpSetting.MailAddressSend, smtpSetting.MailAddressReceive, Utilities.Header_HT_ThongTinNguoiHien, ttnh.CreateFileDataXML().ToString());
                            mailClient.Send(message);
                            bnhtDB.ResetInforSync_ThongTinBN(ttnh.MaBN);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        private void LoadDataBNHT()
        {
            GridPanel panel = dsbn.PrimaryGrid;

            panel.Rows.Clear();
            dsbn.BeginUpdate();
            List <HT_ThongTinNguoiHienTinh> nhts = dbHT.GetAllNguoiHienTinh();

            foreach (var bn in nhts)
            {
                object[] ob1 = new object[]
                {
                    bn.MaBN, bn.HoVaTen, RTTenTinh(bn.Tinh_ThanhPho), bn.SoCMND, bn.NgaySinh.ToString("dd-MM-yyyy"), bn.SoDienThoai, bn.FlagApprove
                };

                panel.Rows.Add(new GridRow(ob1));
            }

            dsbn.EndUpdate();
        }
Example #3
0
        private void LoadItemSelect()
        {
            BenhNhanHienNoanDB dbhn = new BenhNhanHienNoanDB();

            listNHNs = dbhn.GetAllNguoiHienNoan();

            BenhNhanHienTinhDB dbht = new BenhNhanHienTinhDB();

            listNHTs = dbht.GetAllNguoiHienTinh();

            var cboMaBN = (GridComboBoxExEditControl)panel.Columns[1].EditControl;

            foreach (var bn in listNHTs)
            {
                cboMaBN.Items.Add(bn.MaBN);
            }
        }