Example #1
0
        /// <summary>
        /// Update group header totals
        /// </summary>
        private void GridExVillage_RowCheckStateChanged(object sender, RowCheckStateChangeEventArgs e)
        {
            GridEXRow groupToUpdate = e.Row;

            if (groupToUpdate == null)
            {
                // Column header checkbox click
                foreach (var row in GridExVillage.GetRows())
                {
                    UpdateGroupRecordText(row);
                }
                return;
            }

            if (e.Row.RowType == RowType.Record)
            {
                // Normal row
                groupToUpdate = e.Row.Parent;
            }

            if (groupToUpdate.RowType == RowType.GroupHeader)
            {
                if (groupToUpdate.Parent != null)
                {
                    UpdateGroupRecordText(groupToUpdate.Parent);
                }
                else
                {
                    UpdateGroupRecordText(groupToUpdate);
                }
            }
        }
Example #2
0
 void grdPres_RowCheckStateChanged(object sender, RowCheckStateChangeEventArgs e)
 {
     try
     {
         bool _datralai = false;
         foreach (GridEXRow exRow in grdChitiet.GetDataRows())
         {
             exRow.BeginEdit();
             if (Utility.Int32Dbnull(exRow.Cells[TPhieuCapphatChitiet.Columns.IdThuoc].Value, -1) ==
                 Utility.Int32Dbnull(grdPres.GetValue(TPhieuCapphatChitiet.Columns.IdThuoc)))
             {
                 if (Utility.Int32Dbnull(exRow.Cells[TPhieuCapphatChitiet.Columns.TrangthaiTralai].Value, 0) == 0)
                 {
                     exRow.CheckState = e.CheckState;
                 }
                 else
                 {
                     _datralai       = true;
                     exRow.IsChecked = false;
                 }
             }
             exRow.EndEdit();
         }
         if (_datralai && m_enAction == action.Insert)
         {
             Utility.ShowMsg("Chú ý: Hệ thống phát hiện một số chi tiết thuốc đã được tổng hợp trả lại nên không được tổng hợp vào phiếu trả thuốc thừa đang tạo. Bạn có thể nháy chuột phải chọn mục xem chi tiết để kiểm tra lại");
         }
     }
     catch (Exception ex)
     {
         Utility.CatchException(ex);
     }
     finally
     {
         ModifyCommands();
     }
 }
Example #3
0
 private void grdControl_RowCheckStateChanged(object sender, RowCheckStateChangeEventArgs e)
 {
     try
     {
         if (grdControl.CurrentRow.IsChecked)
         {
             LUserFormControl obj = new LUserFormControl();
             obj.UserName  = Utility.sDbnull(grdUser.GetValue("PK_sUID"));
             obj.ControlId = Utility.Int32Dbnull(grdControl.GetValue("Control_ID"));
             obj.IsNew     = true;
             obj.Save();
         }
         else
         {
             new Delete().From(LUserFormControl.Schema.Name).Where(LUserFormControl.Columns.UserName).
             IsEqualTo(grdUser.GetValue("PK_sUID")).And(LUserFormControl.Columns.ControlId).
             IsEqualTo(grdControl.GetValue("Control_ID")).Execute();
         }
     }
     catch (Exception ex)
     {
         Utility.ShowMsg(ex.Message);
     }
 }
Example #4
0
 private void grdTestData_RowCheckStateChanged(object sender, RowCheckStateChangeEventArgs e)
 {
     try
     {
         if (grdTestData.CurrentRow.IsChecked)
         {
             TTestgroupDtl obj = new TTestgroupDtl();
             obj.TestGroupId = Utility.Int32Dbnull(grdTestGroup.GetValue("TestGroup_ID"));
             obj.TestDataId  = Utility.sDbnull(grdTestData.GetValue("TestData_ID"));
             obj.IsNew       = true;
             obj.Save();
         }
         else
         {
             new Delete().From(TTestgroupDtl.Schema.Name).Where(TTestgroupDtl.Columns.TestGroupId).
             IsEqualTo(grdTestGroup.GetValue("TestGroup_ID")).And(TTestgroupDtl.Columns.TestDataId).
             IsEqualTo(grdTestData.GetValue("TestData_ID")).Execute();
         }
     }
     catch (Exception ex)
     {
         Utility.ShowMsg(ex.Message);
     }
 }
Example #5
0
 private void grdTestType_RowCheckStateChanged(object sender, RowCheckStateChangeEventArgs e)
 {
     try
     {
         if (grdTestType.CurrentRow.IsChecked)
         {
             LUserTestType obj = new LUserTestType();
             obj.UserName = Utility.sDbnull(grdUser.GetValue("PK_sUID"));
             obj.TestTypeId = Utility.Int32Dbnull(grdTestType.GetValue("TestType_ID"));
             obj.IsNew = true;
             obj.Save();
         }
         else
         {
             new Delete().From(LUserTestType.Schema.Name).Where(LUserTestType.Columns.UserName).
                 IsEqualTo(grdUser.GetValue("PK_sUID")).And(LUserTestType.Columns.TestTypeId).
                 IsEqualTo(grdTestType.GetValue("TestType_ID")).Execute();
         }
     }
     catch (Exception ex)
     {
         Utility.ShowMsg(ex.Message);
     }
 }
 void grdChitiet_RowCheckStateChanged(object sender, RowCheckStateChangeEventArgs e)
 {
     TinhToanSoTienPhaithu();
     ModifyCommand();
 }
Example #7
0
 void grdChitiet_RowCheckStateChanged(object sender, RowCheckStateChangeEventArgs e)
 {
     ModifyCommands();
 }
 private void grdTestData_RowCheckStateChanged(object sender, RowCheckStateChangeEventArgs e)
 {
     try
     {
         if (grdTestData.CurrentRow.IsChecked)
         {
             TTestgroupDtl obj = new TTestgroupDtl();
             obj.TestGroupId = Utility.Int32Dbnull(grdTestGroup.GetValue("TestGroup_ID"));
             obj.TestDataId = Utility.sDbnull(grdTestData.GetValue("TestData_ID"));
             obj.IsNew = true;
             obj.Save();
         }
         else
         {
             new Delete().From(TTestgroupDtl.Schema.Name).Where(TTestgroupDtl.Columns.TestGroupId).
                 IsEqualTo(grdTestGroup.GetValue("TestGroup_ID")).And(TTestgroupDtl.Columns.TestDataId).
                 IsEqualTo(grdTestData.GetValue("TestData_ID")).Execute();
         }
     }
     catch (Exception ex)
     {
         Utility.ShowMsg(ex.Message);
     }
 }
 private void grdDSKCB_RowCheckStateChanged(object sender, RowCheckStateChangeEventArgs e)
 {
     try
     {
         foreach (GridEXRow exRow in grdThongTinChuaThanhToan.GetDataRows())
         {
             if (Utility.Int32Dbnull(exRow.Cells[KcbThanhtoanChitiet.Columns.IdLoaithanhtoan].Value, -1) ==
                 Utility.Int32Dbnull(grdDSKCB.GetValue("MA")))
             {
                 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 = e.CheckState;
                 }
                 else
                 {
                     exRow.IsChecked = false;
                 }
             }
         }
         //Thay hàm TinhToanSoTienPhaithu= hàm SetSumTotalProperties để tính lại tiền BHYT chi trả
         SetSumTotalProperties();
         //TinhToanSoTienPhaithu();
         ModifyCommand();
     }
     catch
     {
     }
 }
 void grdThongTinChuaThanhToan_RowCheckStateChanged(object sender, RowCheckStateChangeEventArgs e)
 {
     if (e.Row != null)
     {
         e.Row.BeginEdit();
         e.Row.Cells["colChon"].Value = Utility.ByteDbnull(e.CheckState == RowCheckState.Checked ? 1 : 0);
         e.Row.EndEdit();
     }
     TinhToanSoTienPhaithu();
     ModifyCommand();
 }
 void grdPres_RowCheckStateChanged(object sender, RowCheckStateChangeEventArgs e)
 {
     try
     {
         bool _datralai = false;
         foreach (GridEXRow exRow in grdChitiet.GetDataRows())
         {
             exRow.BeginEdit();
             if (Utility.Int32Dbnull(exRow.Cells[TPhieuCapphatChitiet.Columns.IdThuoc].Value, -1) ==
                 Utility.Int32Dbnull(grdPres.GetValue(TPhieuCapphatChitiet.Columns.IdThuoc)))
             {
                 if (Utility.Int32Dbnull(exRow.Cells[TPhieuCapphatChitiet.Columns.TrangthaiTralai].Value, 0) == 0)
                 {
                     exRow.CheckState = e.CheckState;
                 }
                 else
                 {
                     _datralai = true;
                     exRow.IsChecked = false;
                 }
             }
             exRow.EndEdit();
         }
         if (_datralai && m_enAction==action.Insert)
             Utility.ShowMsg("Chú ý: Hệ thống phát hiện một số chi tiết thuốc đã được tổng hợp trả lại nên không được tổng hợp vào phiếu trả thuốc thừa đang tạo. Bạn có thể nháy chuột phải chọn mục xem chi tiết để kiểm tra lại");
     }
     catch (Exception ex)
     {
         Utility.CatchException(ex);
     }
     finally
     {
         ModifyCommands();
     }
 }
 void grdChitiet_RowCheckStateChanged(object sender, RowCheckStateChangeEventArgs e)
 {
     ModifyCommands();
 }
 void grdThongTinChuaThanhToan_RowCheckStateChanged(object sender, RowCheckStateChangeEventArgs e)
 {
     if (e.Row != null)
     {
         e.Row.BeginEdit();
         e.Row.Cells["colChon"].Value = Utility.ByteDbnull(e.CheckState == RowCheckState.Checked ? 1 : 0);
         e.Row.EndEdit();
     }
     //Thay hàm TinhToanSoTienPhaithu= hàm SetSumTotalProperties để tính lại tiền BHYT chi trả
     SetSumTotalProperties();
     //TinhToanSoTienPhaithu();
     ModifyCommand();
 }
Example #14
0
        /// <summary>
        /// Update group header totals
        /// </summary>
        private void GridExVillage_RowCheckStateChanged(object sender, RowCheckStateChangeEventArgs e)
        {
            GridEXRow groupToUpdate = e.Row;
            if (groupToUpdate == null)
            {
                // Column header checkbox click
                foreach (var row in GridExVillage.GetRows())
                {
                    UpdateGroupRecordText(row);
                }
                return;
            }

            if (e.Row.RowType == RowType.Record)
            {
                // Normal row
                groupToUpdate = e.Row.Parent;
            }

            if (groupToUpdate.RowType == RowType.GroupHeader)
            {
                if (groupToUpdate.Parent != null)
                {
                    UpdateGroupRecordText(groupToUpdate.Parent);
                }
                else
                {
                    UpdateGroupRecordText(groupToUpdate);
                }
            }
        }
 private void grdDSKCB_RowCheckStateChanged(object sender, RowCheckStateChangeEventArgs e)
 {
     try
     {
         foreach (GridEXRow exRow in grdThongTinChuaThanhToan.GetDataRows())
         {
             if (Utility.Int32Dbnull(exRow.Cells["Id_Loaithanhtoan"].Value, -1) ==
                 Utility.Int32Dbnull(grdDSKCB.GetValue("MA")))
             {
                 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 = e.CheckState;
                 }
                 else
                 {
                     exRow.IsChecked = false;
                 }
             }
         }
         TinhToanSoTienPhaithu();
         ModifyCommand();
     }
     catch
     {
     }
 }
 void grdThongTinChuaThanhToan_RowCheckStateChanged(object sender, RowCheckStateChangeEventArgs e)
 {
     TinhToanSoTienPhaithu();
     ModifyCommand();
 }
Example #17
0
 private void grdAssignInfo_RowCheckStateChanged(object sender, RowCheckStateChangeEventArgs e)
 {
     ModifyCommand();
 }
 void grdThongTinChuaThanhToan_RowCheckStateChanged(object sender, RowCheckStateChangeEventArgs e)
 {
     //Thay hàm TinhToanSoTienPhaithu= hàm SetSumTotalProperties để tính lại tiền BHYT chi trả
     SetSumTotalProperties();
     //TinhToanSoTienPhaithu();
     ModifyCommand();
 }
Example #19
0
 private void grdAssignInfo_RowCheckStateChanged(object sender, RowCheckStateChangeEventArgs e)
 {
     ModifyCommand();
 }