Exemple #1
0
        private void gridExLicensors_CellValueChanged(object sender, ColumnActionEventArgs e)
        {
            if (e.Column.DataMember == "LicencjodawcaId")
            {
                gridExLicensors.UpdateData();

                if (gridExLicensors.CurrentRow.Cells["LicencjodawcaId"].Value != null)
                {
                    int selectedId = (int)gridExLicensors.CurrentRow.Cells["LicencjodawcaId"].Value;

                    Licensor selectedLicensor = LicensorsRepo.GetById(selectedId);
                    gridExLicensors.CurrentRow.Cells["AdresEmail"].Text      = selectedLicensor.Email;
                    gridExLicensors.CurrentRow.Cells["OsobaFizyczna"].Value  = selectedLicensor.IsNaturalPerson;
                    gridExLicensors.CurrentRow.Cells["PodatekProcent"].Value = selectedLicensor.TaxPercentage;
                }
                else
                {
                    gridExLicensors.CurrentRow.Cells["AdresEmail"].Text      = "";
                    gridExLicensors.CurrentRow.Cells["OsobaFizyczna"].Value  = null;
                    gridExLicensors.CurrentRow.Cells["PodatekProcent"].Value = 0;
                }
            }

            this.SetAgreementChangesPending(true);
        }
Exemple #2
0
 private void objectsGrid_CellEndEdit(object sender, ColumnActionEventArgs e)
 {
     if (NuGenDebugEventHandler.Instance.EventObjects.Thread != null && ActiveFrame != null && objectsGrid.SelectedItems[0].GetRow().RowIndex < objectsGrid.RowCount)
     {
         try
         {
             DisplayWatchExpression(objectsGrid.SelectedItems[0].GetRow());
         }
         catch (Exception exception)
         {
             NuGenUIHandler.Instance.ShowException(exception);
             NuGenUIHandler.Instance.DisplayUserWarning(exception.Message);
         }
         finally
         {
             try
             {
                 ActiveFrame = ActiveFrameRefresher.GetRefreshedValue();
                 NuGenDebugEventHandler.Instance.EventObjects.Frame = ActiveFrame;
             }
             catch (Exception exception)
             {
                 NuGenUIHandler.Instance.ShowException(exception);
                 NuGenUIHandler.Instance.DisplayUserWarning(exception.Message);
             }
         }
     }
 }
        /// <summary>
        /// Sửa thông tin trực tiếp trên lưới
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void grdStaffList_CellUpdated(object sender, ColumnActionEventArgs e)
        {
            try
            {
                grdStaffList.UpdateData();
                grdStaffList.Refresh();
                m_dtStaffList.AcceptChanges();
                int record = new Update(DmucNhanvien.Schema)
                             .Set(DmucNhanvien.Columns.TenNhanvien).EqualTo(Utility.sDbnull(grdStaffList.CurrentRow.Cells[DmucNhanvien.Columns.TenNhanvien].Value, ""))
                             .Set(DmucNhanvien.Columns.MaNhanvien).EqualTo(Utility.sDbnull(grdStaffList.CurrentRow.Cells[DmucNhanvien.Columns.MaNhanvien].Value, ""))
                             .Set(DmucNhanvien.Columns.MotaThem).EqualTo(Utility.sDbnull(grdStaffList.CurrentRow.Cells[DmucNhanvien.Columns.MotaThem].Value, ""))
                             .Set(DmucNhanvien.Columns.TrangThai).EqualTo(Utility.Int16Dbnull(grdStaffList.CurrentRow.Cells[DmucNhanvien.Columns.TrangThai].Value))
                             .Where(DmucNhanvien.Columns.IdNhanvien).IsEqualTo(Utility.Int32Dbnull(grdStaffList.CurrentRow.Cells[DmucNhanvien.Columns.IdNhanvien].Value, -1)).Execute();

                if (record > 0)
                {
                    grdStaffList.UpdateData();
                    grdStaffList.Refresh();
                    m_dtStaffList.AcceptChanges();
                    //Utility.ShowMsg("Bạn thực hiện cập nhập thông tin thành công");
                }
                else
                {
                    Utility.ShowMsg("Lỗi trong quá trình cập nhập dữ liệu");
                    return;
                }
            }
            catch (Exception exception)
            {
            }
        }
Exemple #4
0
 private void grdList_CellUpdated(object sender, ColumnActionEventArgs e)
 {
     try
     {
         if (grdList.CurrentRow == null)
         {
             return;
         }
         if (Utility.sDbnull(grdList.GetValue("MA_LK"), "") != "")
         {
             new Update(Xml1917.Schema)
             .Set(Xml1917.Columns.Stt).EqualTo(grdList.GetValue(Xml1917.Columns.Stt))
             .Set(Xml1917.Columns.MaBn).EqualTo(grdList.GetValue(Xml1917.Columns.MaBn))
             .Set(Xml1917.Columns.HoTen).EqualTo(grdList.GetValue(Xml1917.Columns.HoTen))
             .Set(Xml1917.Columns.NgaySinh).EqualTo(grdList.GetValue(Xml1917.Columns.NgaySinh))
             .Set(Xml1917.Columns.DiaChi).EqualTo(grdList.GetValue(Xml1917.Columns.DiaChi))
             .Set(Xml1917.Columns.MaThe).EqualTo(grdList.GetValue(Xml1917.Columns.MaThe))
             .Set(Xml1917.Columns.MaDkbd).EqualTo(grdList.GetValue(Xml1917.Columns.MaDkbd))
             .Set(Xml1917.Columns.GtTheTu).EqualTo(grdList.GetValue(Xml1917.Columns.GtTheTu))
             .Set(Xml1917.Columns.GtTheDen).EqualTo(grdList.GetValue(Xml1917.Columns.GtTheDen))
             .Set(Xml1917.Columns.MienCungCt).EqualTo(grdList.GetValue(Xml1917.Columns.MienCungCt))
             .Set(Xml1917.Columns.TenBenh).EqualTo(grdList.GetValue(Xml1917.Columns.TenBenh))
             .Set(Xml1917.Columns.MaBenh).EqualTo(grdList.GetValue(Xml1917.Columns.MaBenh))
             .Set(Xml1917.Columns.MaBenhkhac).EqualTo(grdList.GetValue(Xml1917.Columns.MaBenhkhac))
             .Set(Xml1917.Columns.MaLydoVvien).EqualTo(grdList.GetValue(Xml1917.Columns.MaLydoVvien))
             .Set(Xml1917.Columns.MaNoiChuyen).EqualTo(grdList.GetValue(Xml1917.Columns.MaNoiChuyen))
             .Set(Xml1917.Columns.MaTaiNan).EqualTo(grdList.GetValue(Xml1917.Columns.MaTaiNan))
             .Set(Xml1917.Columns.NgayRa).EqualTo(grdList.GetValue(Xml1917.Columns.NgayRa))
             .Set(Xml1917.Columns.NgayVao).EqualTo(grdList.GetValue(Xml1917.Columns.NgayVao))
             .Set(Xml1917.Columns.SoNgayDtri).EqualTo(grdList.GetValue(Xml1917.Columns.SoNgayDtri))
             .Set(Xml1917.Columns.KetQuaDtri).EqualTo(grdList.GetValue(Xml1917.Columns.KetQuaDtri))
             .Set(Xml1917.Columns.TinhTrangRv).EqualTo(grdList.GetValue(Xml1917.Columns.TinhTrangRv))
             .Set(Xml1917.Columns.NgayTtoan).EqualTo(grdList.GetValue(Xml1917.Columns.NgayTtoan))
             .Set(Xml1917.Columns.MucHuong).EqualTo(grdList.GetValue(Xml1917.Columns.MucHuong))
             .Set(Xml1917.Columns.TThuoc).EqualTo(grdList.GetValue(Xml1917.Columns.TThuoc))
             .Set(Xml1917.Columns.TVtyt).EqualTo(grdList.GetValue(Xml1917.Columns.TVtyt))
             .Set(Xml1917.Columns.TTongchi).EqualTo(grdList.GetValue(Xml1917.Columns.TTongchi))
             .Set(Xml1917.Columns.TBntt).EqualTo(grdList.GetValue(Xml1917.Columns.TBntt))
             .Set(Xml1917.Columns.TBncct).EqualTo(grdList.GetValue(Xml1917.Columns.TBncct))
             .Set(Xml1917.Columns.TBhtt).EqualTo(grdList.GetValue(Xml1917.Columns.TBhtt))
             .Set(Xml1917.Columns.TNguonkhac).EqualTo(grdList.GetValue(Xml1917.Columns.TNguonkhac))
             .Set(Xml1917.Columns.TNgoaids).EqualTo(grdList.GetValue(Xml1917.Columns.TNgoaids))
             .Set(Xml1917.Columns.NamQt).EqualTo(grdList.GetValue(Xml1917.Columns.NamQt))
             .Set(Xml1917.Columns.ThangQt).EqualTo(grdList.GetValue(Xml1917.Columns.ThangQt))
             .Set(Xml1917.Columns.MaLoaiKcb).EqualTo(grdList.GetValue(Xml1917.Columns.MaLoaiKcb))
             .Set(Xml1917.Columns.MaKhoa).EqualTo(grdList.GetValue(Xml1917.Columns.MaKhoa))
             .Set(Xml1917.Columns.MaCskcb).EqualTo(grdList.GetValue(Xml1917.Columns.MaCskcb))
             .Set(Xml1917.Columns.MaKhuvuc).EqualTo(grdList.GetValue(Xml1917.Columns.MaKhuvuc))
             .Set(Xml1917.Columns.MaPtttQt).EqualTo(grdList.GetValue(Xml1917.Columns.MaPtttQt))
             .Set(Xml1917.Columns.CanNang).EqualTo(grdList.GetValue(Xml1917.Columns.CanNang))
             .Where(Xml1917.Columns.MaLk).IsEqualTo(grdList.GetValue(Xml1917.Columns.MaLk)).Execute();
         }
     }
     catch (Exception ex)
     {
         Utility.ShowMsg(ex.Message);
     }
 }
        private void grdTestResult_CellUpdated(object sender, ColumnActionEventArgs e)
        {
            try
            {
                if (grdTestResult.CurrentRow == null)
                {
                    return;
                }
                if (Utility.Int32Dbnull(grdTestResult.GetValue("TestDetail_ID"), -1) > 0)
                {
                    new Update(TResultDetail.Schema.Name).Set(TResultDetail.Columns.TestResult).EqualTo(
                        grdTestResult.GetValue("Test_Result")).Where(TResultDetail.Columns.TestDetailId).IsEqualTo(
                        Utility.Int32Dbnull(grdTestResult.GetValue("TestDetail_ID"), -1)).Execute();
                }
                else
                {
                    var obj = new TResultDetail();
                    if (string.IsNullOrEmpty(Utility.sDbnull(grdTestResult.GetValue("Para_Name"))))
                    {
                        Utility.ShowMsg("Tên thông số không được để trống");
                        return;
                    }
                    obj.TestId       = Utility.Int32Dbnull(grdTestResult.GetValue("Test_ID"), -1);
                    obj.PatientId    = Utility.Int32Dbnull(grdTestResult.GetValue("Patient_ID"), -1);
                    obj.TestTypeId   = Utility.Int32Dbnull(grdTestResult.GetValue("TestType_ID"), -1);
                    obj.TestDate     = Utility.getSysDate();
                    obj.DataSequence = Utility.Int32Dbnull(grdTestResult.GetValue("Data_Sequence"));
                    obj.TestResult   = Utility.sDbnull(grdTestResult.GetValue("Test_Result"));
                    obj.NormalLevel  = Utility.sDbnull(grdTestResult.GetValue("Normal_Level"));
                    obj.NormalLevelW = Utility.sDbnull(grdTestResult.GetValue("Normal_levelW"));
                    obj.MeasureUnit  = Utility.sDbnull(grdTestResult.GetValue("Measure_Unit"));
                    obj.ParaName     = Utility.sDbnull(grdTestResult.GetValue("Para_Name"));
                    obj.TestDataId   = Utility.sDbnull(grdTestResult.GetValue("TestData_ID"));
                    obj.ParaStatus   = 0;
                    obj.PrintData    = true;
                    obj.Barcode      = Utility.sDbnull(grdTestResult.GetValue("Barcode"));
                    obj.UpdateNum    = 0;
                    obj.IsNew        = true;
                    obj.Save();

                    grdTestResult.CurrentRow.Cells["TestDetail_ID"].Value =
                        Utility.Int32Dbnull(TResultDetail.CreateQuery().
                                            WHERE(TResultDetail.Columns.PatientId, obj.PatientId).
                                            WHERE(TResultDetail.Columns.TestTypeId, obj.TestTypeId).
                                            GetMax(TResultDetail.Columns.TestDetailId), -1);
                }

                grdTestResult.UpdateData();
                dtTestResult.AcceptChanges();
            }
            catch (Exception ex)
            {
                Utility.ShowMsg(ex.Message);
            }
        }
Exemple #6
0
 /// <summary>
 /// Delete marker
 /// </summary>
 private void MarkersGrid_ColumnButtonClick(object sender, ColumnActionEventArgs e)
 {
     if (e.Column.Key == "Delete" && MarkersGrid.CurrentRow != null)
     {
         if (MarkersGrid.CurrentRow.RowType == RowType.Record)
         {
             var row = MarkersGrid.CurrentRow.DataRow as MarkerGridRow;
             DeleteMarker(row);
             MarkersGrid.CurrentRow.Delete();
         }
     }
 }
Exemple #7
0
 private void grexAppealsReadyForAssignment_LinkClicked(object sender, ColumnActionEventArgs e)
 {
     try
     {
         using (fWait fProgress = new fWait(LawMate.Properties.Resources.waitLoading))
         {
             this.MainForm.OpenFile(CurrentRow().FileId);
         }
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
Exemple #8
0
 private void grexVersionHistory_ColumnButtonClick(object sender, ColumnActionEventArgs e)
 {
     try
     {
         if (e.Column.Key.ToUpper() == "DELETE") // verify which column button was clicked
         {
             DeleteVersion();
         }
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
Exemple #9
0
 private void grdPrintingStatus_ColumnButtonClick(object sender, ColumnActionEventArgs e)
 {
     try
     {
         //Xóa 1 bệnh nhân trong hàng đợi in
         if (grdPrintingStatus.CurrentColumn.Key == "BtnCancel")
         {
             RemovePrintQueue(false);
         }
     }
     catch (Exception ex)
     {
         Utility.ShowMsg(ex.Message);
     }
 }
Exemple #10
0
 private void grdPatients_ColumnButtonClick(object sender, ColumnActionEventArgs e)
 {
     try
     {
         //Tick nút chọn để in từng bệnh nhân
         if (grdPatients.CurrentColumn.Key == "BtnChon")
         {
             PrintAction(new[] { grdPatients.CurrentRow });
         }
     }
     catch (Exception ex)
     {
         Utility.ShowMsg(ex.Message);
     }
 }
Exemple #11
0
        private void Dgv_Detalle_CellEdited(object sender, ColumnActionEventArgs e)
        {
            Double caja, grupo, maple, cantidad, subTotal, precio, total;

            caja     = Convert.ToDouble(Dgv_Detalle.CurrentRow.Cells[3].Value) * 360;
            grupo    = Convert.ToDouble(Dgv_Detalle.CurrentRow.Cells[4].Value) * 300;
            maple    = Convert.ToDouble(Dgv_Detalle.CurrentRow.Cells[5].Value) * 30;
            cantidad = Convert.ToDouble(Dgv_Detalle.CurrentRow.Cells[6].Value);
            subTotal = caja + grupo + maple + cantidad;
            Dgv_Detalle.CurrentRow.Cells[7].Value = subTotal;
            precio = Convert.ToDouble(Dgv_Detalle.CurrentRow.Cells[8].Value);
            total  = subTotal * precio;
            Dgv_Detalle.CurrentRow.Cells[9].Value = total;
            MP_ObtenerCalculo();
        }
Exemple #12
0
 private void Dgv_Seleccion_CellEdited(object sender, ColumnActionEventArgs e)
 {
     try
     {
         Double cantidad, precio, total;
         cantidad = Convert.ToDouble(Dgv_Seleccion.CurrentRow.Cells["Cantidad"].Value);
         precio   = Convert.ToDouble(Dgv_Seleccion.CurrentRow.Cells["Precio"].Value);
         total    = cantidad * precio;
         Dgv_Seleccion.CurrentRow.Cells["Total"].Value = total;
         MP_ObtenerCalculo();
     }
     catch (Exception ex)
     {
         MP_MostrarMensajeError(ex.Message);
     }
 }
        /// <summary>
        /// hàm thực hiên viecj cập nhập thôn tin trên lưới
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void grdServiceDetail_CellUpdated(object sender, ColumnActionEventArgs e)
        {
            int ServiceDetail_ID = Utility.Int32Dbnull(grdServiceDetail.GetValue(DmucDichvuclsChitiet.Columns.IdChitietdichvu));

            if (e.Column.Key == DmucDichvuclsChitiet.Columns.SttHthi)
            {
                new Update(DmucDichvuclsChitiet.Schema)
                .Set(DmucDichvuclsChitiet.Columns.SttHthi).EqualTo(
                    Utility.Int32Dbnull(grdServiceDetail.GetValue(DmucDichvuclsChitiet.Columns.SttHthi)))
                .Set(DmucDichvuclsChitiet.Columns.NgaySua).EqualTo(globalVariables.SysDate)
                .Set(DmucDichvuclsChitiet.Columns.NguoiSua).EqualTo(globalVariables.UserName)
                .Where(DmucDichvuclsChitiet.Columns.IdChitietdichvu).IsEqualTo(
                    Utility.Int32Dbnull(grdServiceDetail.GetValue(DmucDichvuclsChitiet.Columns.IdChitietdichvu))).Execute();
            }
            Utility.GotoNewRowJanus(grdServiceDetail, DmucDichvuclsChitiet.Columns.IdChitietdichvu, Utility.sDbnull(ServiceDetail_ID));
        }
 private void Dgv_Detalle_CellEdited(object sender, ColumnActionEventArgs e)
 {
     try
     {
         Double cantidad, totalProd, total;
         cantidad  = Convert.ToDouble(Dgv_Detalle.CurrentRow.Cells["Cantidad"].Value);
         totalProd = Convert.ToDouble(Dgv_Detalle.CurrentRow.Cells["TotalProd"].Value);
         total     = cantidad * totalProd;
         Dgv_Detalle.CurrentRow.Cells["Total"].Value = total;
         //MP_ObtenerCalculo();
     }
     catch (Exception ex)
     {
         MP_MostrarMensajeError(ex.Message);
     }
 }
Exemple #15
0
 private void grdDevice_CellValueChanged(object sender, ColumnActionEventArgs e)
 {
     try
     {
         if (grdDevice.CurrentColumn.Key == "Valid")
         {
             new Update(DDeviceList.Schema).Set(DDeviceList.Columns.Valid).EqualTo(grdDevice.GetValue("Valid")).
             Where(DDeviceList.Columns.DeviceId).IsEqualTo(Utility.Int32Dbnull(grdDevice.GetValue("Device_ID"))).Execute();
         }
         grdDevice.UpdateData();
         dtDevice.AcceptChanges();
     }
     catch (Exception ex)
     {
         Utility.ShowMsg(ex.Message);
     }
 }
Exemple #16
0
 private void Dgv_Detalle_CellEdited(object sender, ColumnActionEventArgs e)
 {
     try
     {
         Double cantidad, precio, total, utilidad, precioVenta;
         cantidad = Convert.ToDouble(Dgv_Detalle.CurrentRow.Cells["Cantidad"].Value);
         precio   = Convert.ToDouble(Dgv_Detalle.CurrentRow.Cells["Costo"].Value);
         total    = cantidad * precio;
         Dgv_Detalle.CurrentRow.Cells["Total"].Value = total;
         utilidad    = Convert.ToDouble(Dgv_Detalle.CurrentRow.Cells["Utilidad"].Value);
         precioVenta = total * (utilidad / 100);
         Dgv_Detalle.CurrentRow.Cells["Porcent"].Value = precioVenta;
         MP_ObtenerCalculo();
     }
     catch (Exception ex)
     {
         MP_MostrarMensajeError(ex.Message);
     }
 }
Exemple #17
0
 private void gridDVKT_CellUpdated(object sender, ColumnActionEventArgs e)
 {
     try
     {
         if (Utility.sDbnull(gridDVKT.GetValue("ID_XML3"), "") != "")
         {
             new Update(Xml3917.Schema)
             .Set(Xml3917.Columns.Stt).EqualTo(gridDVKT.GetValue(Xml3917.Columns.Stt))
             .Set(Xml3917.Columns.MaDichVu).EqualTo(gridDVKT.GetValue(Xml3917.Columns.MaDichVu))
             .Set(Xml3917.Columns.MaVatTu).EqualTo(gridDVKT.GetValue(Xml3917.Columns.MaVatTu))
             .Set(Xml3917.Columns.TenDichVu).EqualTo(gridDVKT.GetValue(Xml3917.Columns.TenDichVu))
             .Set(Xml3917.Columns.TenVatTu).EqualTo(gridDVKT.GetValue(Xml3917.Columns.TenVatTu))
             .Set(Xml3917.Columns.DonViTinh).EqualTo(gridDVKT.GetValue(Xml3917.Columns.DonViTinh))
             .Set(Xml3917.Columns.NgayKq).EqualTo(gridDVKT.GetValue(Xml3917.Columns.NgayKq))
             .Set(Xml3917.Columns.SoLuong).EqualTo(gridDVKT.GetValue(Xml3917.Columns.SoLuong))
             .Set(Xml3917.Columns.DonGia).EqualTo(gridDVKT.GetValue(Xml3917.Columns.DonGia))
             .Set(Xml3917.Columns.TyleTt).EqualTo(gridDVKT.GetValue(Xml3917.Columns.TyleTt))
             .Set(Xml3917.Columns.ThanhTien).EqualTo(gridDVKT.GetValue(Xml3917.Columns.ThanhTien))
             .Set(Xml3917.Columns.MaKhoa).EqualTo(gridDVKT.GetValue(Xml3917.Columns.MaKhoa))
             .Set(Xml3917.Columns.MaBacSi).EqualTo(gridDVKT.GetValue(Xml3917.Columns.MaBacSi))
             .Set(Xml3917.Columns.MaBenh).EqualTo(gridDVKT.GetValue(Xml3917.Columns.MaBenh))
             .Set(Xml3917.Columns.NgayYl).EqualTo(gridDVKT.GetValue(Xml3917.Columns.NgayYl))
             .Set(Xml3917.Columns.MaPttt).EqualTo(gridDVKT.GetValue(Xml3917.Columns.MaPttt))
             .Set(Xml3917.Columns.TtThau).EqualTo(gridDVKT.GetValue(Xml3917.Columns.TtThau))
             .Set(Xml3917.Columns.PhamVi).EqualTo(gridDVKT.GetValue(Xml3917.Columns.PhamVi))
             .Set(Xml3917.Columns.MucHuong).EqualTo(gridDVKT.GetValue(Xml3917.Columns.MucHuong))
             .Set(Xml3917.Columns.TNguonkhac).EqualTo(gridDVKT.GetValue(Xml3917.Columns.TNguonkhac))
             .Set(Xml3917.Columns.TBntt).EqualTo(gridDVKT.GetValue(Xml3917.Columns.TBntt))
             .Set(Xml3917.Columns.TBncct).EqualTo(gridDVKT.GetValue(Xml3917.Columns.TBncct))
             .Set(Xml3917.Columns.TBhtt).EqualTo(gridDVKT.GetValue(Xml3917.Columns.TBhtt))
             .Set(Xml3917.Columns.TNgoaids).EqualTo(gridDVKT.GetValue(Xml3917.Columns.TNgoaids))
             .Set(Xml3917.Columns.GoiVtyt).EqualTo(gridDVKT.GetValue(Xml3917.Columns.GoiVtyt))
             .Set(Xml3917.Columns.MaGiuong).EqualTo(gridDVKT.GetValue(Xml3917.Columns.MaGiuong))
             .Set(Xml3917.Columns.TTrantt).EqualTo(gridDVKT.GetValue(Xml3917.Columns.TTrantt))
             .Where(Xml3917.Columns.IdXML3).IsEqualTo(gridDVKT.GetValue(Xml3917.Columns.IdXML3)).Execute();
         }
     }
     catch (Exception ex)
     {
         Utility.ShowMsg(ex.Message);
     }
 }
Exemple #18
0
 private void gridEXSMS_CellUpdated(object sender, ColumnActionEventArgs e)
 {
     if (e.Column.Key == "CHECKED")
     {
         int i = gridEXSMS.Row;
         if (gridEXSMS.GetRow(i).Cells["TELEFON"].Text == "")
         {
             if (Convert.ToBoolean(gridEXSMS.GetRow(i).Cells["CHECKED"].Value) == true)
             {
                 DialogResult r = MessageBox.Show("Nuk mund të dërgoni sms për nxënësin nqs nuk është ruajtur për të një numër telefoni.",
                                                  Text, MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
                 if (r == DialogResult.OK)
                 {
                     gridEXSMS.GetRow(i).Cells["CHECKED"].Value = false;
                     gridEXSMS.Refetch();
                 }
             }
         }
     }
 }
Exemple #19
0
 private void gridThuoc_CellUpdated(object sender, ColumnActionEventArgs e)
 {
     try
     {
         if (Utility.sDbnull(gridThuoc.GetValue("ID_XML2"), "") != "")
         {
             new Update(Xml2917.Schema)
             .Set(Xml2917.Columns.Stt).EqualTo(gridThuoc.GetValue(Xml2917.Columns.Stt))
             .Set(Xml2917.Columns.MaThuoc).EqualTo(gridThuoc.GetValue(Xml2917.Columns.MaThuoc))
             .Set(Xml2917.Columns.MaNhom).EqualTo(gridThuoc.GetValue(Xml2917.Columns.MaNhom))
             .Set(Xml2917.Columns.TenThuoc).EqualTo(gridThuoc.GetValue(Xml2917.Columns.TenThuoc))
             .Set(Xml2917.Columns.DonViTinh).EqualTo(gridThuoc.GetValue(Xml2917.Columns.DonViTinh))
             .Set(Xml2917.Columns.HamLuong).EqualTo(gridThuoc.GetValue(Xml2917.Columns.HamLuong))
             .Set(Xml2917.Columns.LieuDung).EqualTo(gridThuoc.GetValue(Xml2917.Columns.LieuDung))
             .Set(Xml2917.Columns.SoDangKy).EqualTo(gridThuoc.GetValue(Xml2917.Columns.SoDangKy))
             .Set(Xml2917.Columns.SoLuong).EqualTo(gridThuoc.GetValue(Xml2917.Columns.SoLuong))
             .Set(Xml2917.Columns.DonGia).EqualTo(gridThuoc.GetValue(Xml2917.Columns.DonGia))
             .Set(Xml2917.Columns.TyleTt).EqualTo(gridThuoc.GetValue(Xml2917.Columns.TyleTt))
             .Set(Xml2917.Columns.ThanhTien).EqualTo(gridThuoc.GetValue(Xml2917.Columns.ThanhTien))
             .Set(Xml2917.Columns.MaKhoa).EqualTo(gridThuoc.GetValue(Xml2917.Columns.MaKhoa))
             .Set(Xml2917.Columns.MaBacSi).EqualTo(gridThuoc.GetValue(Xml2917.Columns.MaBacSi))
             .Set(Xml2917.Columns.MaBenh).EqualTo(gridThuoc.GetValue(Xml2917.Columns.MaBenh))
             .Set(Xml2917.Columns.NgayYl).EqualTo(gridThuoc.GetValue(Xml2917.Columns.NgayYl))
             .Set(Xml2917.Columns.MaPttt).EqualTo(gridThuoc.GetValue(Xml2917.Columns.MaPttt))
             .Set(Xml2917.Columns.TtThau).EqualTo(gridThuoc.GetValue(Xml2917.Columns.TtThau))
             .Set(Xml2917.Columns.PhamVi).EqualTo(gridThuoc.GetValue(Xml2917.Columns.PhamVi))
             .Set(Xml2917.Columns.MucHuong).EqualTo(gridThuoc.GetValue(Xml2917.Columns.MucHuong))
             .Set(Xml2917.Columns.TNguonkhac).EqualTo(gridThuoc.GetValue(Xml2917.Columns.TNguonkhac))
             .Set(Xml2917.Columns.TBntt).EqualTo(gridThuoc.GetValue(Xml2917.Columns.TBntt))
             .Set(Xml2917.Columns.TBncct).EqualTo(gridThuoc.GetValue(Xml2917.Columns.TBncct))
             .Set(Xml2917.Columns.TBhtt).EqualTo(gridThuoc.GetValue(Xml2917.Columns.TBhtt))
             .Set(Xml2917.Columns.TNgoaids).EqualTo(gridThuoc.GetValue(Xml2917.Columns.TNgoaids))
             .Where(Xml2917.Columns.IdXML2).IsEqualTo(gridThuoc.GetValue(Xml2917.Columns.IdXML2)).Execute();
         }
     }
     catch (Exception ex)
     {
         Utility.ShowMsg(ex.Message);
     }
 }
Exemple #20
0
        /// <summary>
        /// sửa thông tin trực tiếp trên lưới
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void grdPhongBan_CellUpdated(object sender, ColumnActionEventArgs e)
        {
            int Parent_ID = 0;
            int id        = Utility.Int32Dbnull(grdPhongBan.CurrentRow.Cells[DmucKhoaphong.Columns.IdKhoaphong].Value);
            int record    = new Update(DmucKhoaphong.Schema)
                            .Set(DmucKhoaphong.Columns.TenKhoaphong).EqualTo(grdPhongBan.CurrentRow.Cells[DmucKhoaphong.Columns.TenKhoaphong].Text)
                            .Set(DmucKhoaphong.Columns.SttHthi).EqualTo(grdPhongBan.CurrentRow.Cells[DmucKhoaphong.Columns.SttHthi].Text)
                            .Where(DmucKhoaphong.Columns.IdKhoaphong).IsEqualTo(Utility.Int32Dbnull(grdPhongBan.CurrentRow.Cells[DmucKhoaphong.Columns.IdKhoaphong].Text, -1))
                            .Execute();

            if (record > 0)
            {
                grdPhongBan.UpdateData();
                grdPhongBan.Refresh();
                dsDepartment.AcceptChanges();
            }
            else
            {
                Utility.ShowMsg("Lỗi trong quá trình cập nhập thông tin ");
            }
            ModifyCommand();
        }
 private void grdList_ColumnButtonClick(object sender, ColumnActionEventArgs e)
 {
     try
     {
         if (!Utility.isValidGrid(grdList))
         {
             ClearControl();
         }
         int       idbenhnhan = Utility.Int32Dbnull(grdList.GetValue(KcbLuotkham.Columns.IdBenhnhan), -1);
         DataTable dtData     = _kcbThamkham.KcbLichsuKcbLuotkham(idbenhnhan);
         Utility.SetDataSourceForDataGridEx_Basic(grdLuotkham, dtData, true, true, "", "");
         UpdateGroup();
         grdLuotkham.MoveFirst();
     }
     catch (Exception exception)
     {
         if (globalVariables.IsAdmin)
         {
             Utility.ShowMsg(exception.ToString());
         }
     }
 }
 private void grdLuotkham_ColumnButtonClick(object sender, ColumnActionEventArgs e)
 {
     try
     {
         if (!Utility.isValidGrid(grdLuotkham))
         {
             ClearControl();
         }
         string    maluotkham = Utility.sDbnull(grdLuotkham.GetValue(KcbLuotkham.Columns.MaLuotkham), "");
         DataTable dtData     = _kcbThamkham.KcbLichsuKcbTimkiemphongkham(maluotkham);
         if (dtData.Rows.Count > 0)
         {
             grdRegExam.DataSource = dtData;
             grbRegs.Height        = grdRegExam.GetDataRows().Length <= 1 ? 0 : 50;
             grdRegExam.MoveFirst();
         }
     }
     catch (Exception ex)
     {
         Utility.CatchException(ex);
     }
 }
 private void grdDetail_CellValueChanged(object sender, ColumnActionEventArgs e)
 {
     ModifycommandAssignDetail();
 }
 //private void chkChuaThanhToan_CheckedChanged(object sender, EventArgs e)
 //{
 //    try
 //    {
 //        string _rowFilter = "1=1";
 //        if (chkChuaThanhToan.Checked)
 //        {
 //            _rowFilter = string.Format("{0}={1}", "Payment_status", 0);
 //        }
 //        m_dtChiPhiThanhtoan.DefaultView.RowFilter = _rowFilter;
 //        m_dtChiPhiThanhtoan.AcceptChanges();
 //    }catch(Exception exception)
 //    {
 //    }
 //}
 //private void chkDaThanhToan_CheckedChanged(object sender, EventArgs e)
 //{
 //    try
 //    {
 //        string _rowFilter = "1=1";
 //        if (chkDaThanhToan.Checked)
 //        {
 //            _rowFilter = string.Format("{0}={1}", "Payment_status", 1);
 //        }
 //        m_dtChiPhiThanhtoan.DefaultView.RowFilter = _rowFilter;
 //        m_dtChiPhiThanhtoan.AcceptChanges();
 //    }
 //    catch (Exception exception)
 //    {
 //    }
 //}
 /// <summary>
 ///     /hàm thực hiện việc lọc thông tin chọn thông tin của chưa thanh toana
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 /// <summary>
 ///     hàm thực hiện việc khởi tọa sự kiện của lưới thanh toán
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void grdPayment_ColumnButtonClick(object sender, ColumnActionEventArgs e)
 {
     if (e.Column.Key == "cmdPHIEU_THU")
     {
         CallPhieuThu();
     }
     if (e.Column.Key == "cmdHUY_PHIEUTHU")
     {
         HuyThanhtoan();
     }
 }
 private void grdDSKCB_ColumnHeaderClick(object sender, ColumnActionEventArgs e)
 {
     try
     {
         grdDSKCB.RowCheckStateChanged -= grdDSKCB_RowCheckStateChanged;
         foreach (GridEXRow row in grdDSKCB.GetDataRows())
         {
             foreach (GridEXRow exRow in grdThongTinChuaThanhToan.GetDataRows())
             {
                 if (Utility.Int32Dbnull(exRow.Cells[KcbThanhtoanChitiet.Columns.IdLoaithanhtoan].Value, -1) ==
                     Utility.Int32Dbnull(row.Cells["MA"].Value))
                 {
                     if (Utility.Int32Dbnull(exRow.Cells["trangthai_huy"].Value, 0) == 0 &&
                         //Utility.Int32Dbnull(exRow.Cells["trang_thai"].Value, 0) == 0 &&
                         Utility.Int32Dbnull(exRow.Cells["trangthai_thanhtoan"].Value, 0) == 0)
                     {
                         exRow.CheckState = row.CheckState;
                     }
                     else
                     {
                         exRow.IsChecked = false;
                     }
                 }
             }
         }
         //Thay hàm TinhToanSoTienPhaithu= hàm SetSumTotalProperties để tính lại tiền BHYT chi trả
         SetSumTotalProperties();
         //TinhToanSoTienPhaithu();
         ModifyCommand();
         grdDSKCB.RowCheckStateChanged += grdDSKCB_RowCheckStateChanged;
     }
     catch (Exception)
     {
         Utility.ShowMsg("Có lỗi trong quá trình xử lý thông tin");
     }
 }
 private void grdAssignDetail_CellUpdated(object sender, ColumnActionEventArgs e)
 {
     ModifyButtonCommand();
 }
        private void grdDiease_CellUpdated(object sender, ColumnActionEventArgs e)
        {
            try
            {
                int record = new Update(DmucBenh.Schema)
                 .Set(DmucBenh.Columns.TenBenh).EqualTo(Utility.sDbnull(grdDiease.CurrentRow.Cells[DmucBenh.Columns.TenBenh].Value, ""))
                 .Set(DmucBenh.Columns.MaBenh).EqualTo(Utility.sDbnull(grdDiease.CurrentRow.Cells[DmucBenh.Columns.MaBenh].Value, ""))
                 .Set(DmucBenh.Columns.MotaThem).EqualTo(Utility.sDbnull(grdDiease.CurrentRow.Cells[DmucBenh.Columns.MotaThem].Value, ""))
                 .Where(DmucBenh.Columns.IdBenh).IsEqualTo(Utility.Int32Dbnull(grdDiease.CurrentRow.Cells[DmucBenh.Columns.IdBenh].Value, -1)).Execute();

                if (record > 0)
                {
                    grdDiease.UpdateData();
                    grdDiease.Refresh();
                    m_dtDiease.AcceptChanges();
                    Utility.ShowMsg("Bạn thực hiện cập nhập thông tin thành công");
                }
                else
                {
                    Utility.ShowMsg("Lỗi trong quá trình cập nhập dữ liệu");
                    return;
                }
            }
            catch (Exception exception)
            {

            }
        }
 private void grdTestInfo_CellValueChanged(object sender, ColumnActionEventArgs e)
 {
 }
 /// <summary>
 ///     HÀM THỰC HIỆN VIỆC THAY ĐỔI THÔNG TIN PHIẾU CẬN LÂM SÀNG
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void grdThongTinDaThanhToan_CellUpdated(object sender, ColumnActionEventArgs e)
 {
     if (e.Column.Key == KcbThanhtoanChitiet.Columns.TrangthaiHuy)
     {
     }
 }
 /// <summary>
 ///     hàm thực hiện viecj  check trạng thái nút thanh toán
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void grdThongTinChuaThanhToan_CellValueChanged(object sender, ColumnActionEventArgs e)
 {
     try
     {
        // TinhToanSoTienPhaithu();
         //ModifyCommand();
     }
     catch (Exception exception)
     {
         if (globalVariables.IsAdmin)
         {
             Utility.ShowMsg(exception.ToString());
         }
     }
 }
 private void grdPhieuChi_ColumnButtonClick(object sender, ColumnActionEventArgs e)
 {
     try
     {
         if (e.Column.Key == "cmdPHIEUCHI")
         {
             CallPhieuChi();
         }
         if (e.Column.Key == "cmdHuyPhieuChi")
         {
             CallHuyPhieuChi();
         }
     }
     catch (Exception exception)
     {
         //throw;
     }
 }
Exemple #32
0
 private void Dgv_Detalle_CellValueChanged(object sender, ColumnActionEventArgs e)
 {
 }
Exemple #33
0
 private void grdAssignInfo_ColumnHeaderClick(object sender, ColumnActionEventArgs e)
 {
     ModifyCommand();
 }
 private void grdResultDetail_CellUpdated(object sender, ColumnActionEventArgs e)
 {
     Insert_Update_Result();
 }
        private void grdTestInfoModification_CellUpdated(object sender, ColumnActionEventArgs e)
        {
            if (grdTestInfoModification.CurrentColumn.Key == "Barcode")
            {
                bool bSuccess = false;
                string vBarcode = Utility.sDbnull(grdTestInfoModification.GetValue("Barcode"));
                try
                {
                    //Tim Patient_ID moi cho test_ID dang dc chon
                    if (vBarcode.Length <= 4) vBarcode = DateTime.Now.ToString("yyMMdd") + vBarcode.PadLeft(4, '0');

                    DataTable dtPatientModified =
                        TTestInfo.CreateQuery().WHERE(TTestInfo.Columns.Barcode, vBarcode).AND(
                            TTestInfo.Columns.PatientId, Comparison.GreaterThan, 0).ExecuteDataSet().Tables[0];

                    //Neu ko tim thay
                    if (
                        (from drCount in dtPatientModified.AsEnumerable() select drCount["Patient_ID"]).Distinct().Count
                            () != 1)
                    {
                        Utility.ShowMsg(
                            string.Format(
                                "Không tìm thấy bệnh nhân có barcode {0} hoặc tìm thấy nhiều hơn 1 bệnh nhân. Đề nghị thực hiện lại.",
                                vBarcode));
                        grdTestInfoModification.CurrentRow.Cells["Barcode"].Value = CurrentRowBarcode;
                        return;
                    }
                    //Neu tim thay
                    int newPatientID = Utility.Int32Dbnull(dtPatientModified.Rows[0]["Patient_ID"]);
                    int oldPatientID = Utility.Int32Dbnull(grdTestInfoModification.GetValue("Patient_ID"));
                    int oldTestID = Utility.Int32Dbnull(grdTestInfoModification.GetValue("Test_ID"));

                    int vTestType_ID = Utility.Int32Dbnull(grdTestInfoModification.GetValue("TestType_ID"));

                    LPatientInfo obj = LPatientInfo.FetchByID(newPatientID);
                    if (obj == null)
                    {
                        Utility.ShowMsg("Không tồn tại bệnh nhân !");
                        return;
                    }

                    if (
                        !Utility.AcceptQuestion(
                            string.Format("Thực hiện chuyển sang bệnh nhận {0} có barcode {1} ?", obj.PatientName,
                                          vBarcode), "Thông báo", true))
                        return;

                    DataRow dr = Utility.GetDataRow(dtPatientModified, "TestType_ID", vTestType_ID);
                    DataRow drPatient = Utility.GetDataRow(dtResultModification,
                                                           new[] {"Patient_ID", "Test_ID"},
                                                           new object[] {oldPatientID, oldTestID});
                    if (drPatient == null)
                    {
                        Utility.ShowMsg("Không tìm thấy thông tin trên lưới");
                        return;
                    }

                    int newTest_ID = oldTestID;
                    if (oldTestID > 0)
                    {
                        if (dr == null)
                        {
                            newTest_ID = oldTestID;
                            new Update(TTestInfo.Schema.Name). //Set(TTestInfo.Columns.Barcode).EqualTo(vBarcode).
                                Set(TTestInfo.Columns.PatientId).EqualTo(newPatientID).
                                Set(TTestInfo.Columns.Barcode).EqualTo(vBarcode).
                                Where(TTestInfo.Columns.TestId).IsEqualTo(oldTestID).
                                Execute();
                            //Utility.ShowMsg(string.Format("Tìm thấy bệnh nhân {0}, chưa đăng ký {1}. Đề nghị thực hiện lại.",
                            //    obj.PatientName, grdResultModification.GetValue("TestType_Name")));
                            //return;
                        }
                        else if (oldPatientID > 0)
                        {
                            if (
                                !Utility.AcceptQuestion(
                                    string.Format(
                                        "Giữ đăng ký của bệnh nhân cũ và chỉ thực hiện chuyển kết quả sang bệnh nhận {0} có barcode {1} ?",
                                        obj.PatientName, dr["Barcode"]), "Thông báo", true))
                            {
                                //Update PatientID cho T_Test_Info
                                new Update(TTestInfo.Schema.Name). //Set(TTestInfo.Columns.Barcode).EqualTo(vBarcode).
                                    Set(TTestInfo.Columns.PatientId).EqualTo(newPatientID).
                                    Set(TTestInfo.Columns.Barcode).EqualTo(vBarcode).
                                    Where(TTestInfo.Columns.TestId).IsEqualTo(oldTestID).
                                    Execute();
                            }
                            else newTest_ID = Utility.Int32Dbnull(dr["Test_ID"]);
                        }
                        else newTest_ID = Utility.Int32Dbnull(dr["Test_ID"]);
                    }
                    else
                    {
                        //Utility.ShowMsg(string.Format("Tìm thấy bệnh nhân {0}, chưa đăng ký {1}. Đề nghị thực hiện lại.",
                        //        obj.PatientName, grdResultModification.GetValue("TestType_Name")));
                        //return;
                        TTestInfo objTestInfo = new TTestInfo();
                        objTestInfo.DeviceId = -1;
                        objTestInfo.PatientId = newPatientID;
                        objTestInfo.Barcode = vBarcode;
                        objTestInfo.TestDate = DateTime.Now;
                        objTestInfo.RequireDate = DateTime.Now;
                        objTestInfo.TestTypeId = Utility.Int32Dbnull(grdTestInfoModification.GetValue("TestType_ID"));
                        objTestInfo.TestStatus = 0;
                        objTestInfo.PrintStatus = 0;
                        objTestInfo.IsNew = true;
                        objTestInfo.Save();
                        newTest_ID = Utility.Int32Dbnull(objTestInfo.TestId);
                    }

                    //Update PatientID,TestID,Barcode cho T_Result_Detail
                    new Update(TResultDetail.Schema.Name).Set(TResultDetail.Columns.PatientId).EqualTo(newPatientID).
                        Set(TResultDetail.Columns.Barcode).EqualTo(vBarcode).
                        Set(TResultDetail.Columns.TestId).EqualTo(newTest_ID).
                        Set(TResultDetail.Columns.TestDate).EqualTo(DateTime.Now.ToString()).
                        Where(TResultDetail.Columns.TestId).IsEqualTo(oldTestID).
                        And(TResultDetail.Columns.PatientId).IsEqualTo(oldPatientID).
                        And(TResultDetail.Columns.Barcode).IsEqualTo(CurrentRowBarcode).
                        Execute();

                    //Sửa trạng thái Has_Result của những test có kết quả
                    var dtTestHasResult =
                        new Select(TResultDetail.Columns.TestDataId).From(TResultDetail.Schema.Name).Where(
                            TResultDetail.Columns.Barcode).IsEqualTo(vBarcode).And(TResultDetail.Columns.TestId).
                            IsEqualTo(newTest_ID).ExecuteDataSet().Tables[0];
                    var listTestHasResult = (from d in dtTestHasResult.AsEnumerable() select d["TestData_ID"]).ToList();
                    new Update(TRegList.Schema.Name).Set(TRegList.Columns.HasResult).EqualTo(1).Where(
                        TRegList.Columns.Barcode).IsEqualTo(vBarcode).And(TResultDetail.Columns.TestDataId).In(listTestHasResult).Execute();

                    if (oldTestID > 0 & oldPatientID <= 0 & dr != null)
                        new Delete().From(TTestInfo.Schema.Name).Where(TTestInfo.Columns.TestId).IsEqualTo(oldTestID).
                            Execute();
                    else if (
                        TResultDetail.CreateQuery().WHERE(TResultDetail.Columns.TestId, oldTestID).GetRecordCount() <=
                        0)
                    {
                        if (
                            Utility.AcceptQuestion(
                                string.Format("Đăng ký {0} của bệnh nhân {1} không còn kết quả. Thực hiện xóa ?",
                                              drPatient["TestType_Name"], drPatient["Patient_Name"]), "Thông báo",
                                true))
                        {
                            new Delete().From(TTestInfo.Schema.Name).Where(TTestInfo.Columns.TestId).IsEqualTo(
                                oldTestID).Execute();
                        }
                    }
                    if (oldPatientID > 0 &
                        TTestInfo.CreateQuery().WHERE(TTestInfo.Columns.PatientId, oldPatientID).GetRecordCount() <= 0)
                        if (
                            Utility.AcceptQuestion(
                                string.Format("Bệnh nhận {0} không còn đăng ký. Thực hiện xóa ?",
                                              grdTestInfoModification.GetValue("Patient_Name")), "Thông báo", true))
                        {
                            new Delete().From(LPatientInfo.Schema.Name).Where(LPatientInfo.Columns.PatientId).IsEqualTo(
                                oldPatientID).Execute();
                        }

                    //Cap nhan thong tin BN tren luoi
                    if (newTest_ID == oldTestID)
                    {
                        Utility.FromObjectToDatarow(obj, ref drPatient);
                        if (obj.YearBirth != null) drPatient["Age"] = DateTime.Now.Year - obj.YearBirth;
                        drPatient["SexName"] = obj.Sex == true ? "Nam" : "Nữ";
                        dtResultModification.AcceptChanges();
                    }
                    else
                    {
                        //grdTestInfoModification.CurrentRow.Delete();
                        //grdTestInfoModification.Refresh();
                        grdTestInfoModification.UpdateData();
                        dtResultModification.AcceptChanges();
                        btnSearchModification.PerformClick();
                    }
                    bSuccess = true;
                }
                catch (Exception ex)
                {
                    Utility.ShowMsg(ex.Message);
                }
                finally
                {
                    if (!bSuccess)
                    {
                        grdTestInfoModification.CurrentRow.Cells["Barcode"].Value = CurrentRowBarcode;
                        grdTestInfoModification.UpdateData();
                        dtResultModification.AcceptChanges();
                    }
                }
            }
        }
 private void grdThongTinDaThanhToan_ColumnHeaderClick(object sender, ColumnActionEventArgs e)
 {
     ModifyCommand();
 }
 private void grdTestTypeRegList_CellValueChanged(object sender, ColumnActionEventArgs e)
 {
     try
     {
         if (e.Column.Key == "Status")
         {
             int vStatus = Utility.Int32Dbnull(grdTestTypeRegList.GetValue("Status"));
             new Update(TRegList.Schema.Name).Set(TRegList.Columns.Status).
                 EqualTo(vStatus).Where(TRegList.Columns.TestRegDetailId).
                 IsEqualTo(Utility.Int32Dbnull(grdTestTypeRegList.GetValue("TestRegDetail_ID"))).
                 Execute();
             grdTestTypeRegList.UpdateData();
             dtTestTypeandTRegList.AcceptChanges();
         }
     }
     catch (Exception ex)
     {
         Utility.ShowMsg(ex.Message);
     }
 }
 private void grdAssignDetail_CellValueChanged(object sender, ColumnActionEventArgs e)
 {
     ModifycommandAssignDetail();
 }
        void grdList_CellUpdated(object sender, ColumnActionEventArgs e)
        {
            try
            {
                int ServiceDetail_ID = Utility.Int32Dbnull(grdList.GetValue(DmucDichvucl.Columns.IdDichvu));

                if (e.Column.Key == DmucDichvucl.Columns.SttHthi)
                {
                    new Update(DmucDichvucl.Schema)
                        .Set(DmucDichvucl.Columns.SttHthi).EqualTo(
                            Utility.Int32Dbnull(grdList.GetValue(DmucDichvucl.Columns.SttHthi)))
                        .Set(DmucDichvucl.Columns.NgaySua).EqualTo(globalVariables.SysDate)
                        .Set(DmucDichvucl.Columns.NguoiSua).EqualTo(globalVariables.UserName)
                        .Where(DmucDichvucl.Columns.IdDichvu).IsEqualTo(
                            Utility.Int32Dbnull(grdList.GetValue(DmucDichvucl.Columns.IdDichvu))).Execute();

                }
                Utility.GotoNewRowJanus(grdList, DmucDichvucl.Columns.IdDichvu, Utility.sDbnull(ServiceDetail_ID));
            }
            catch
            { }
        }
 /// <summary>
 /// hàm thực hiện việc update thông tin của cell update
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void grdAssignDetail_CellUpdated(object sender, ColumnActionEventArgs e)
 {
 }
 private void grdServiceDetail_CellValueChanged(object sender, ColumnActionEventArgs e)
 {
     if (chkChiDinhNhanh.Checked)
     {
         if (grdServiceDetail.CurrentRow.IsChecked)
         {
             AddOneRow_ServiceDetail();
         }
     }
 }
Exemple #42
0
 private void grdReport_CellUpdated(object sender, ColumnActionEventArgs e)
 {
     grdReport.UpdateData();
 }
Exemple #43
0
 private void grdReport_CellUpdated(object sender, ColumnActionEventArgs e)
 {
     grdReport.UpdateData();
 }
 void grdQhe_CellUpdated(object sender, ColumnActionEventArgs e)
 {
     try
     {
         if (grdQhe.CurrentColumn != null) e.Column.InputMask = "{0:#,#.##}";
     }
     catch
     {
     }
 }
        /// <summary>
        ///     hàm thực hiện việc lấy thông tin
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void grdList_ColumnButtonClick(object sender, ColumnActionEventArgs e)
        {
            if (e.Column.Key == "CHONBN")
            {
                getData();

            }
        }
        private void grdPhieuNhapChiTiet_CellUpdated(object sender, ColumnActionEventArgs e)
        {
            if (e.Column.Key.ToUpper() == TPhieuNhapxuatthuocChitiet.Columns.SoLuong.ToUpper()
                || e.Column.Key.ToUpper() == TPhieuNhapxuatthuocChitiet.Columns.GiaNhap.ToUpper()
                || e.Column.Key.ToUpper() == TPhieuNhapxuatthuocChitiet.Columns.GiaBan.ToUpper()
                || e.Column.Key.ToUpper() == TPhieuNhapxuatthuocChitiet.Columns.ChietKhau.ToUpper()
                || e.Column.Key.ToUpper() == TPhieuNhapxuatthuocChitiet.Columns.GiaPhuthuDungtuyen.ToUpper()
                || e.Column.Key.ToUpper() == TPhieuNhapxuatthuocChitiet.Columns.GiaPhuthuTraituyen.ToUpper()
                || e.Column.Key.ToUpper() == TPhieuNhapxuatthuocChitiet.Columns.ThangDu.ToUpper()

                )
            {
                e.Column.InputMask = "{0:#,#.##}";
            }
              //  UpdateWhenChanged();
        }
 /// <summary>
 ///     hàm thực hiện việc thay đổi ngày thanh toán
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void grdPhieuChi_CellUpdated(object sender, ColumnActionEventArgs e)
 {
     if (e.Column.Key == KcbThanhtoan.Columns.NgayThanhtoan)
     {
         //UpdatePaymentDate();
         UpdatePhieuChiPaymentDate();
     }
 }
 private void grdDetail_ColumnHeaderClick(object sender, ColumnActionEventArgs e)
 {
     ModifycommandAssignDetail();
 }
 /// <summary>
 ///     hàm thực hiện việc format thông tin số tiền cần nợp
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void grdThongTinChuaThanhToan_CellUpdated(object sender, ColumnActionEventArgs e)
 {
     //Thay hàm TinhToanSoTienPhaithu= hàm SetSumTotalProperties để tính lại tiền BHYT chi trả
     SetSumTotalProperties();
     //TinhToanSoTienPhaithu();
     e.Column.InputMask = "{0:#,#.##}";
 }
Exemple #50
0
 void GridEX2_CellValueChanged(object sender, ColumnActionEventArgs e)
 {
     GridEX2.UpdateData();
     Recalc();
 }
 /// <summary>
 ///     hàm thực hiện viecj trạng thái của grid header
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void grdThongTinChuaThanhToan_ColumnHeaderClick(object sender, ColumnActionEventArgs e)
 {
     try
     {
         grdThongTinChuaThanhToan.RowCheckStateChanged -= grdThongTinChuaThanhToan_RowCheckStateChanged;
         //Thay hàm TinhToanSoTienPhaithu= hàm SetSumTotalProperties để tính lại tiền BHYT chi trả
         SetSumTotalProperties();
         //TinhToanSoTienPhaithu();
     }
     catch (Exception exception)
     {
         if (globalVariables.IsAdmin)
         {
             Utility.ShowMsg(exception.ToString());
         }
     }
     finally
     {
         grdThongTinChuaThanhToan.RowCheckStateChanged += grdThongTinChuaThanhToan_RowCheckStateChanged;
     }
 }
Exemple #52
0
 private void gridExSchedule_CellValueChanged(object sender, ColumnActionEventArgs e)
 {
     this.SetAgreementChangesPending(true);
 }
 private void grdThongTinDaThanhToan_CellValueChanged(object sender, ColumnActionEventArgs e)
 {
     ModifyCommand();
 }
Exemple #54
0
 private void gridExPositions_CellValueChanged(object sender, ColumnActionEventArgs e)
 {
     this.SetPositionChangesPending(true);
 }
 private void grdAssignDetail_ColumnHeaderClick(object sender, ColumnActionEventArgs e)
 {
     ModifycommandAssignDetail();
 }
 void grd_ICD_ColumnButtonClick(object sender, ColumnActionEventArgs e)
 {
     try
     {
         if (e.Column.Key == "XOA")
         {
             grd_ICD.CurrentRow.Delete();
             dt_ICD_PHU.AcceptChanges();
             grd_ICD.Refetch();
             grd_ICD.AutoSizeColumns();
         }
     }
     catch (Exception)
     {
         Utility.ShowMsg("Có lỗi trong quá trình xóa thông tin Mã ICD");
         throw;
     }
     finally
     {
     }
 }
 private void grdRegExam_ColumnButtonClick(object sender, ColumnActionEventArgs e)
 {
     if (e.Column.Key == "colDelete")
     {
         if (!CheckBeforeDelete())
             return;
         HuyThamKham();
     }
     if (e.Column.Key == "colIn")
     {
         InPhieu();
     }
     if (e.Column.Key == "colThanhtoan")
     {
         if (Utility.sDbnull(cmdThanhToanKham.Tag, "ABCD") == "TT")
             Thanhtoan(true);
         else
             HuyThanhtoan();
     }
 }
 /// <summary>
 ///     hàm thực hiện việc format thông tin số tiền cần nợp
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void grdThongTinChuaThanhToan_CellUpdated(object sender, ColumnActionEventArgs e)
 {
     TinhToanSoTienPhaithu();
     e.Column.InputMask = "{0:#,#.##}";
 }
 void grdPhieudieutri_ColumnButtonClick(object sender, ColumnActionEventArgs e)
 {
     if (e.Column.Key == "colView")
     {
         _buttonClick = true;
         Selectionchanged();
     }
 }
 /// <summary>
 ///     hàm thực hiện viecj trạng thái của grid header
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void grdThongTinChuaThanhToan_ColumnHeaderClick(object sender, ColumnActionEventArgs e)
 {
     try
     {
         grdThongTinChuaThanhToan.RowCheckStateChanged -= grdThongTinChuaThanhToan_RowCheckStateChanged;
         TinhToanSoTienPhaithu();
         //ModifyCommand();
     }
     catch (Exception exception)
     {
         if (globalVariables.IsAdmin)
         {
             Utility.ShowMsg(exception.ToString());
         }
     }
     finally
     {
         grdThongTinChuaThanhToan.RowCheckStateChanged += grdThongTinChuaThanhToan_RowCheckStateChanged;
     }
 }