Exemplo n.º 1
0
        /// <summary>
        /// Trả về 0 nếu hệ thống đang được phép giao dịch
        /// </summary>
        /// <param name="responseMessage"> Message tương ứng</param>
        /// <returns></returns>
        public int KiemTraHopLeHeThong(ref ApplicationConstant.NghiepVuResponseMessage responseMessage)
        {
            int          iret        = 0; //Kết quả trả về
            BS_CoHeThong bsCoHeThong = new BS_CoHeThong();

            //Kiểm tra trạng thái hệ thống, có được giao dịch không?
            switch (bsCoHeThong.KiemTraTrangThaiHeThong())
            {
            case -1:
                iret            = -1;
                responseMessage = ApplicationConstant.NghiepVuResponseMessage.M_ResponseMessage_HeThong_TamNgungGiaoDich;
                break;

            case -2:
                iret            = -1;
                responseMessage = ApplicationConstant.NghiepVuResponseMessage.M_ResponseMessage_HeThong_NgungGiaoDich;
                break;

            default:
                iret            = 0;
                responseMessage = ApplicationConstant.NghiepVuResponseMessage.M_ResponseMessage_DungChung_ThanhCong;
                break;
            }

            return(iret);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Lấy dữ liệu
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="responseMessage"></param>
        /// <returns></returns>
        public ApplicationConstant.ResponseStatus PhamVi_LayDuLieu(ref THONG_TIN_CHUNG objThongTinChung, ref PHAM_VI obj, ref ApplicationConstant.QuanTriHeThongResponseMessage responseMessage, ref BS_ResponseDetail bsRetDetail)
        {
            ApplicationConstant.NghiepVuResponseMessage responseMessageNV = ApplicationConstant.NghiepVuResponseMessage.M_ResponseMessage_DungChung_ThanhCong;

            //Kiểm tra hợp lệ hệ thống
            if (new BS_DungChung_Detail().KiemTraHopLeHeThong(ref responseMessageNV) != 0)
            {
                return(ApplicationConstant.ResponseStatus.KHONG_THANH_CONG);
            }
            //Xử lý nghiệp vụ
            return(new BS_PhamVi_Detail().LayDuLieu(ref obj, ref responseMessage, ref bsRetDetail));
        }