private void delete_v_dm_chuc_vu()
 {
     if (!CGridUtils.IsThere_Any_NonFixed_Row(m_fg))
     {
         return;
     }
     if (!CGridUtils.isValid_NonFixed_RowIndex(m_fg, m_fg.Row))
     {
         return;
     }
     if (BaseMessages.askUser_DataCouldBeDeleted(8) != BaseMessages.IsDataCouldBeDeleted.CouldBeDeleted)
     {
         return;
     }
     grid2us_object(m_us, m_fg.Row);
     try
     {
         m_us.BeginTransaction();
         m_us.Delete();
         m_us.CommitTransaction();
         m_fg.Rows.Remove(m_fg.Row);
     }
     catch (Exception v_e)
     {
         m_us.Rollback();
         CDBExceptionHandler v_objErrHandler = new CDBExceptionHandler(v_e,
                                                                       new CDBClientDBExceptionInterpret());
         v_objErrHandler.showErrorMessage();
     }
 }
Beispiel #2
0
        private void delete_ht_tham_so_he_thong()
        {
            if (!CGridUtils.IsThere_Any_NonFixed_Row(m_fg))
            {
                return;
            }
            if (!CGridUtils.isValid_NonFixed_RowIndex(m_fg, m_fg.Row))
            {
                return;
            }
            if (BaseMessages.askUser_DataCouldBeDeleted(8) != BaseMessages.IsDataCouldBeDeleted.CouldBeDeleted)
            {
                return;
            }
            US_HT_THAM_SO_HE_THONG v_us = new US_HT_THAM_SO_HE_THONG();

            grid2us_object(v_us, m_fg.Row);
            try {
                v_us.BeginTransaction();
                v_us.Delete();
                v_us.CommitTransaction();
                m_fg.Rows.Remove(m_fg.Row);
            }
            catch (Exception v_e) {
                v_us.Rollback();
                CDBExceptionHandler v_objErrHandler = new CDBExceptionHandler(v_e,
                                                                              new CDBClientDBExceptionInterpret());
                v_objErrHandler.showErrorMessage();
            }
        }
Beispiel #3
0
        private void delete_v_gd_chi_tiet_cap_bac()
        {
            if (!CGridUtils.IsThere_Any_NonFixed_Row(m_fg))
            {
                return;
            }
            if (!CGridUtils.isValid_NonFixed_RowIndex(m_fg, m_fg.Row))
            {
                return;
            }
            if (BaseMessages.askUser_DataCouldBeDeleted(8) != BaseMessages.IsDataCouldBeDeleted.CouldBeDeleted)
            {
                return;
            }
            US_V_GD_CHI_TIET_CAP_BAC v_v_us = new US_V_GD_CHI_TIET_CAP_BAC();
            US_GD_CHI_TIET_CAP_BAC   v_us   = new US_GD_CHI_TIET_CAP_BAC();

            grid2us_object(v_v_us, m_fg.Row);
            v_us.dcID = v_v_us.dcID;
            try {
                v_us.BeginTransaction();
                v_us.Delete();
                v_us.CommitTransaction();
                m_fg.Rows.Remove(m_fg.Row);
            } catch (Exception v_e) {
                v_us.Rollback();
                CDBExceptionHandler v_objErrHandler = new CDBExceptionHandler(v_e,
                                                                              new CDBClientDBExceptionInterpret());
                v_objErrHandler.showErrorMessage();
            }
        }
Beispiel #4
0
        private void delete_v_gd_qua_trinh_lam_viec()
        {
            if (!CGridUtils.IsThere_Any_NonFixed_Row(m_fg))
            {
                return;
            }
            if (!CGridUtils.isValid_NonFixed_RowIndex(m_fg, m_fg.Row))
            {
                return;
            }
            if (BaseMessages.askUser_DataCouldBeDeleted(8) != BaseMessages.IsDataCouldBeDeleted.CouldBeDeleted)
            {
                return;
            }
            US_V_GD_QUA_TRINH_LAM_VIEC v_us = new US_V_GD_QUA_TRINH_LAM_VIEC();

            grid2us_object(v_us, m_fg.Row);
            try {
                v_us.BeginTransaction();
                v_us.Delete();
                v_us.CommitTransaction();
                m_fg.Rows.Remove(m_fg.Row);
            }
            catch (Exception v_e) {
                v_us.Rollback();
                CDBExceptionHandler v_objErrHandler = new CDBExceptionHandler(v_e,
                                                                              new CDBClientDBExceptionInterpret());
                v_objErrHandler.showErrorMessage();
            }
        }
Beispiel #5
0
        private void delete_nguoi_dai_dien()
        {
            if (!HelpUtils.is_validated_edit_grid_row(m_fg_nguoi_dai_dien.Row, m_fg))
            {
                return;
            }
            if (BaseMessages.askUser_DataCouldBeDeleted(8) != BaseMessages.IsDataCouldBeDeleted.CouldBeDeleted)
            {
                return;
            }
            US_V_DM_NGUOI_DAI_DIEN v_us = new US_V_DM_NGUOI_DAI_DIEN();

            grid2us_object_nguoi_dai_dien(v_us, m_fg_nguoi_dai_dien.Row);
            try {
                v_us.BeginTransaction();
                v_us.Delete();
                v_us.CommitTransaction();
                m_fg.Rows.Remove(m_fg.Row);
            }
            catch (Exception v_e) {
                v_us.Rollback();
                CDBExceptionHandler v_objErrHandler = new CDBExceptionHandler(v_e,
                                                                              new CDBClientDBExceptionInterpret());
                v_objErrHandler.showErrorMessage();
            }
        }
Beispiel #6
0
        private void delete_v_dm_don_vi()
        {
            if (!CGridUtils.IsThere_Any_NonFixed_Row(m_fg))
            {
                return;
            }
            if (!CGridUtils.isValid_NonFixed_RowIndex(m_fg, m_fg.Row))
            {
                return;
            }
            if (BaseMessages.askUser_DataCouldBeDeleted(8) != BaseMessages.IsDataCouldBeDeleted.CouldBeDeleted)
            {
                return;
            }
            var v_us = new US_V_DM_DON_VI();

            grid2us_object(v_us, m_fg.Row);
            try {
                v_us.BeginTransaction();
                v_us.DeleteByID(v_us.dcID);
                v_us.CommitTransaction();
                m_fg.Rows.Remove(m_fg.Row);
                load_data_2_grid();
                BaseMessages.MsgBox_Infor("Xóa thành công.");
            } catch (Exception v_e) {
                v_us.Rollback();
                var v_objErrHandler = new CDBExceptionHandler(v_e,
                                                              new CDBClientDBExceptionInterpret());
                v_objErrHandler.showErrorMessage();
            }
        }
Beispiel #7
0
        private void delete_v_dm_cau_hoi_ko_tra_loi()
        {
            if (!HelpUtils.is_validated_edit_grid_row(m_fg.Row, m_fg))
            {
                return;
            }
            if (BaseMessages.askUser_DataCouldBeDeleted(8) != BaseMessages.IsDataCouldBeDeleted.CouldBeDeleted)
            {
                return;
            }
            US_V_DM_CAU_HOI_KO_TRA_LOI v_us = new US_V_DM_CAU_HOI_KO_TRA_LOI();

            grid2us_object(v_us, m_fg.Row);
            try {
                v_us.BeginTransaction();
                v_us.Delete();
                v_us.CommitTransaction();
                m_fg.Rows.Remove(m_fg.Row);
            }
            catch (Exception v_e) {
                v_us.Rollback();
                CDBExceptionHandler v_objErrHandler = new CDBExceptionHandler(v_e,
                                                                              new CDBClientDBExceptionInterpret());
                v_objErrHandler.showErrorMessage();
            }
        }
Beispiel #8
0
        private void delete_v_dm_quyet_dinh()
        {
            if (!CGridUtils.IsThere_Any_NonFixed_Row(m_grv_dm_quyet_dinh))
            {
                return;
            }
            if (!CGridUtils.isValid_NonFixed_RowIndex(m_grv_dm_quyet_dinh, m_grv_dm_quyet_dinh.Row))
            {
                return;
            }
            if (BaseMessages.askUser_DataCouldBeDeleted(8) != BaseMessages.IsDataCouldBeDeleted.CouldBeDeleted)
            {
                return;
            }
            US_V_DM_QUYET_DINH v_us = new US_V_DM_QUYET_DINH();

            grid2us_object(v_us, m_grv_dm_quyet_dinh.Row);
            try {
                v_us.BeginTransaction();
                v_us.Delete();
                v_us.CommitTransaction();
                m_grv_dm_quyet_dinh.Rows.Remove(m_grv_dm_quyet_dinh.Row);
            } catch (Exception v_e) {
                v_us.Rollback();
                CDBExceptionHandler v_objErrHandler = new CDBExceptionHandler(v_e,
                                                                              new CDBClientDBExceptionInterpret());
                v_objErrHandler.showErrorMessage();
            }
        }
        private void delete_v_gd_trang_thai_lao_dong()
        {
            if (!CGridUtils.IsThere_Any_NonFixed_Row(m_grv_trang_thai_ld))
            {
                return;
            }
            if (!CGridUtils.isValid_NonFixed_RowIndex(m_grv_trang_thai_ld, m_grv_trang_thai_ld.Row))
            {
                return;
            }
            if (BaseMessages.askUser_DataCouldBeDeleted(8) != BaseMessages.IsDataCouldBeDeleted.CouldBeDeleted)
            {
                return;
            }
            US_V_GD_TRANG_THAI_LAO_DONG v_us = new US_V_GD_TRANG_THAI_LAO_DONG();

            grid2us_object(v_us, m_grv_trang_thai_ld.Row);
            try {
                v_us.BeginTransaction();
                v_us.delete_by_id_gd_chi_tiet_trang_thai_ld(v_us.dcID);
                v_us.CommitTransaction();
                m_grv_trang_thai_ld.Rows.Remove(m_grv_trang_thai_ld.Row);
                BaseMessages.MsgBox_Infor("Đã xóa thành công!");
            }
            catch (Exception v_e) {
                v_us.Rollback();
                CDBExceptionHandler v_objErrHandler = new CDBExceptionHandler(v_e,
                                                                              new CDBClientDBExceptionInterpret());
                v_objErrHandler.showErrorMessage();
            }
        }
        private void delete_rpt_luong_don_vi_theo_ky()
        {
            if (!CGridUtils.IsThere_Any_NonFixed_Row(m_fg))
            {
                return;
            }
            if (!CGridUtils.isValid_NonFixed_RowIndex(m_fg, m_fg.Row))
            {
                return;
            }
            if (BaseMessages.askUser_DataCouldBeDeleted(8) != BaseMessages.IsDataCouldBeDeleted.CouldBeDeleted)
            {
                return;
            }
            US_RPT_LUONG_DON_VI_THEO_KY v_us = new US_RPT_LUONG_DON_VI_THEO_KY();

            grid2us_object(v_us, m_fg.Row);
            try
            {
                v_us.BeginTransaction();
                v_us.Delete();
                v_us.CommitTransaction();
                m_fg.Rows.Remove(m_fg.Row);
            }
            catch (Exception v_e)
            {
                v_us.Rollback();
                CDBExceptionHandler v_objErrHandler = new CDBExceptionHandler(v_e,
                                                                              new CDBClientDBExceptionInterpret());
                v_objErrHandler.showErrorMessage();
            }
        }
        private void delete_v_gd_cong_tac()
        {
            if (!CGridUtils.IsThere_Any_NonFixed_Row(m_fg))
            {
                return;
            }
            if (!CGridUtils.isValid_NonFixed_RowIndex(m_fg, m_fg.Row))
            {
                return;
            }
            if (BaseMessages.askUser_DataCouldBeDeleted(8) != BaseMessages.IsDataCouldBeDeleted.CouldBeDeleted)
            {
                return;
            }
            US_V_GD_CONG_TAC v_us = new US_V_GD_CONG_TAC();

            grid2us_object(v_us, m_fg.Row);
            try
            {
                v_us.BeginTransaction();
                v_us.DeleteByID(v_us.dcID_QUYET_DINH);
                v_us.CommitTransaction();
                m_fg.Rows.Remove(m_fg.Row);
                BaseMessages.MsgBox_Infor("Xóa thành công.");
                m_fg.Select(1, (int)e_col_Number.MA_QUYET_DINH);
            }
            catch (Exception v_e)
            {
                v_us.Rollback();
                throw v_e;
            }
        }
        private void delete_v_gd_luong_theo_qd()
        {
            // Check validation
            if (!CGridUtils.IsThere_Any_NonFixed_Row(m_fg))
            {
                return;
            }
            if (!CGridUtils.isValid_NonFixed_RowIndex(m_fg, m_fg.Row))
            {
                return;
            }
            if (BaseMessages.askUser_DataCouldBeDeleted(8) != BaseMessages.IsDataCouldBeDeleted.CouldBeDeleted)
            {
                return;
            }

            // Init
            US_V_GD_LUONG_THEO_QD v_us_v_gd = new US_V_GD_LUONG_THEO_QD();

            // Grid 2 us
            grid2us_object(v_us_v_gd, m_fg.Row);

            try
            {
                m_fg.Redraw = false;
                v_us_v_gd.BeginTransaction();
                v_us_v_gd.DeleteByID(v_us_v_gd.dcID_QUYET_DINH);
                v_us_v_gd.CommitTransaction();
                m_fg.Rows.Remove(m_fg.Row);
                m_fg.Redraw = true;
            }
            catch (Exception v_e)
            {
                v_us_v_gd.Rollback();
                CDBExceptionHandler v_objErrHandler = new CDBExceptionHandler(v_e,
                                                                              new CDBClientDBExceptionInterpret());
                v_objErrHandler.showErrorMessage();
            }
        }
        private void delete_v_gd_quyet_dinh()
        {
            if (!CGridUtils.IsThere_Any_NonFixed_Row(m_fg))
            {
                return;
            }
            if (!CGridUtils.isValid_NonFixed_RowIndex(m_fg, m_fg.Row))
            {
                return;
            }
            if (BaseMessages.askUser_DataCouldBeDeleted(8) != BaseMessages.IsDataCouldBeDeleted.CouldBeDeleted)
            {
                return;
            }
            US_V_GD_QUYET_DINH         v_us       = new US_V_GD_QUYET_DINH();
            US_GD_QUYET_DINH_PHAP_NHAN v_us_qd_pn = new US_GD_QUYET_DINH_PHAP_NHAN();
            DS_GD_QUYET_DINH_PHAP_NHAN v_ds_qd_pn = new DS_GD_QUYET_DINH_PHAP_NHAN();

            grid2us_object(v_us, m_fg.Row);
            try
            {
                v_us.BeginTransaction();
                // Xoá Quyết định - Pháp nhân
                v_us_qd_pn.FillDatasetByIdQuyetDinh(v_ds_qd_pn, v_us.dcID);
                v_us_qd_pn.DeleteByID(v_us.dcID);

                // Xoá Pháp nhân
                v_us.delete_by_id(v_us.dcID);
                v_us.CommitTransaction();
                m_fg.Rows.Remove(m_fg.Row);
            }
            catch (Exception v_e)
            {
                v_us.Rollback();
                CDBExceptionHandler v_objErrHandler = new CDBExceptionHandler(v_e,
                                                                              new CDBClientDBExceptionInterpret());
                v_objErrHandler.showErrorMessage();
            }
        }
Beispiel #14
0
        private void delete_v_gd_qua_trinh_lam_viec()
        {
            if (!CGridUtils.IsThere_Any_NonFixed_Row(m_grv_qua_trinh_lam_viec))
            {
                return;
            }
            if (!CGridUtils.isValid_NonFixed_RowIndex(m_grv_qua_trinh_lam_viec, m_grv_qua_trinh_lam_viec.Row))
            {
                return;
            }
            if (BaseMessages.askUser_DataCouldBeDeleted(8) != BaseMessages.IsDataCouldBeDeleted.CouldBeDeleted)
            {
                return;
            }
            US_V_GD_QUA_TRINH_LAM_VIEC v_us = new US_V_GD_QUA_TRINH_LAM_VIEC();

            grid2us_object(v_us, m_grv_qua_trinh_lam_viec.Row);
            try {
                //v_us.BeginTransaction();
                //v_us.Delete();
                //v_us.CommitTransaction();
                //m_grv_qua_trinh_lam_viec.Rows.Remove(m_grv_qua_trinh_lam_viec.Row);
                v_us.BeginTransaction();
                v_us.delete_by_id_gd_chi_tiet_chuc_vu(v_us.dcID);
                v_us.CommitTransaction();
                m_grv_qua_trinh_lam_viec.Rows.Remove(m_grv_qua_trinh_lam_viec.Row);
                BaseMessages.MsgBox_Infor("Đã xóa thành công!");
                load_data_2_grid_search();
            }
            catch (Exception v_e) {
                v_us.Rollback();
                CDBExceptionHandler v_objErrHandler = new CDBExceptionHandler(v_e,
                                                                              new CDBClientDBExceptionInterpret());
                v_objErrHandler.showErrorMessage();
            }
        }