示例#1
0
        public bool LayNhomTaiSanNhoNhat(ref List <TS_DM_NHOM_TSCD> lstNhomTS)
        {
            //Kiểm tra kết nối, server, service trước khi request
            Common.Utilities.IsRequestAllow(ApplicationConstant.SystemService.TaiSanService.layGiaTri());
            TaiSanRequest  request  = Common.Utilities.PrepareRequest(new TaiSanServiceRef.TaiSanRequest());
            TaiSanResponse response = new TaiSanServiceRef.TaiSanResponse();

            try
            {
                //Khoi tao request
                request.lstNhomTSan = lstNhomTS.ToArray();


                // make a call to service client
                response = Client.LayNhomTaiSanNhoNhat(request);

                //Kiem tra ket qua tra ve
                Common.Utilities.ValidResponse(request, response);

                if (response != null && response.ResponseStatus == ApplicationConstant.ResponseStatus.THANH_CONG)
                {
                    lstNhomTS = response.lstNhomTSan.ToList();
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex);
                return(false);
            }
        }
示例#2
0
        public bool LayThongTinGiaoDich(ref KIEM_SOAT objKiemSoat, BIEN_DONG_DTO objBienDongDto)
        {
            //Kiểm tra kết nối, server, service trước khi request
            Common.Utilities.IsRequestAllow(ApplicationConstant.SystemService.TaiSanService.layGiaTri());
            TaiSanRequest  request  = Common.Utilities.PrepareRequest(new TaiSanServiceRef.TaiSanRequest());
            TaiSanResponse response = new TaiSanServiceRef.TaiSanResponse();

            try
            {
                //Khoi tao request
                request.objBienDongDto = objBienDongDto;

                // make a call to service client
                response = Client.LayThongTinGiaoDich(request);

                //Kiem tra ket qua tra ve
                Common.Utilities.ValidResponse(request, response);

                if (response != null && response.ResponseStatus == ApplicationConstant.ResponseStatus.THANH_CONG)
                {
                    objKiemSoat = response.objKiemSoat;
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex);
                return(false);
            }
        }
示例#3
0
        /// <summary>
        /// Lay object nhom tai san cha
        /// </summary>
        /// <param name="objNhomTSanCha"></param>
        /// <returns></returns>
        public int GetNhomTSanCha(ref TS_DM_NHOM_TSCD objNhomTSanCha)
        {
            int kq = 1;

            //Kiem tra ket noi server, service
            Common.Utilities.IsRequestAllow(ApplicationConstant.SystemService.TaiSanService.layGiaTri());
            TaiSanRequest  request  = Common.Utilities.PrepareRequest(new TaiSanRequest());
            TaiSanResponse response = new TaiSanResponse();

            try
            {
                //Khoi tao request
                request.objNhomTSCha = objNhomTSanCha;
                request.Function     = DatabaseConstant.Function.TS_DM_NHOM_TS_GET_NHOM_CHA;

                //Make a call service client
                response = Client.NhomTaiSanCT(request);

                if (response != null && response.ResponseStatus == ApplicationConstant.ResponseStatus.THANH_CONG)
                {
                    objNhomTSanCha = response.objNhomTSCha;
                }
                else
                {
                    kq = 0;
                }
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex);
                kq = 0;
            }
            return(kq);
        }
示例#4
0
        public bool KhauHaoTaiSan(DatabaseConstant.Function function, DatabaseConstant.Action action, List <int> lstID, DIEU_KIEN_TIM_KIEM_DTO dieuKien, ref KHAU_HAO_DTO obj, ref List <DANH_SACH_KHAU_HAO_DTO> lstDanhSach, ref List <ClientResponseDetail> listClientResponseDetail)
        {
            //Kiểm tra kết nối, server, service trước khi request
            Common.Utilities.IsRequestAllow(ApplicationConstant.SystemService.TaiSanService.layGiaTri());
            TaiSanRequest  request  = Common.Utilities.PrepareRequest(new TaiSanServiceRef.TaiSanRequest());
            TaiSanResponse response = new TaiSanServiceRef.TaiSanResponse();

            try
            {
                //Khoi tao request
                request.Function      = function;
                request.Action        = action;
                request.dieuKien      = dieuKien;
                request.objKhauHaoDto = obj;
                request.dsKhauHaoDto  = lstDanhSach.ToArray();

                request.lstID = lstID.ToArray();

                // make a call to service client
                response = Client.KhauHaoTaiSan(request);

                //Kiem tra ket qua tra ve
                Common.Utilities.ValidResponse(request, response);

                if (response != null && response.ResponseStatus == ApplicationConstant.ResponseStatus.THANH_CONG)
                {
                    if (!response.objKhauHaoDto.IsNullOrEmpty())
                    {
                        obj = response.objKhauHaoDto;
                    }
                    if (!response.dsKhauHaoDto.IsNullOrEmpty())
                    {
                        lstDanhSach = response.dsKhauHaoDto.ToList();
                    }
                    return(true);
                }
                else
                {
                    listClientResponseDetail = Common.Utilities.convertToClientResponseDetail(response);
                    return(false);
                }
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex);
                return(false);
            }
        }
示例#5
0
        public bool NhomTaiSanCT(DatabaseConstant.Action action, ref TS_DM_NHOM_TSCD objNhomTSanCT, ref List <KT_PHAN_HE_PLOAI> lstPLoai, string sMaNhomCha, ref List <ClientResponseDetail> listClientResponseDetail)
        {
            //Kiểm tra kết nối, server, service trước khi request
            Common.Utilities.IsRequestAllow(ApplicationConstant.SystemService.TaiSanService.layGiaTri());
            TaiSanRequest  request  = Common.Utilities.PrepareRequest(new TaiSanServiceRef.TaiSanRequest());
            TaiSanResponse response = new TaiSanServiceRef.TaiSanResponse();

            if (lstPLoai == null)
            {
                lstPLoai = new List <KT_PHAN_HE_PLOAI>();
            }
            try
            {
                //Khoi tao request
                request.Function    = DatabaseConstant.Function.TS_DM_NHOM_TS_CT;
                request.Action      = action;
                request.objNhomTSCD = objNhomTSanCT;
                request.lstPLoai    = lstPLoai.ToArray();
                request.sMaNhomCha  = sMaNhomCha;

                // make a call to service client
                response = Client.NhomTaiSanCT(request);

                //Kiem tra ket qua tra ve
                Common.Utilities.ValidResponse(request, response);

                if (response != null && response.ResponseStatus == ApplicationConstant.ResponseStatus.THANH_CONG)
                {
                    objNhomTSanCT = response.objNhomTSCD;
                    if (response.lstPLoai != null)
                    {
                        lstPLoai = response.lstPLoai.ToList();
                    }
                    return(true);
                }
                else
                {
                    listClientResponseDetail = Common.Utilities.convertToClientResponseDetail(response);
                    return(false);
                }
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex);
                return(false);
            }
        }
示例#6
0
        public bool DanhSachNhomTaiSan(ref List <TS_DM_NHOM_TSCD> lstNhomTSan, ref List <ClientResponseDetail> lstClientResponseDetail, DatabaseConstant.Action action, string sTThaiNVu)
        {
            //Kiem tra ket noi server, service
            bool kq = true;

            Common.Utilities.IsRequestAllow(ApplicationConstant.SystemService.TaiSanService.layGiaTri());
            TaiSanRequest  request  = Common.Utilities.PrepareRequest(new TaiSanRequest());
            TaiSanResponse response = new TaiSanResponse();

            try
            {
                //Khoi tao request
                request.Function    = DatabaseConstant.Function.TS_DM_NHOM_TS_DS;
                request.lstNhomTSan = lstNhomTSan.ToArray();
                request.Action      = action;
                request.sMaNhomCha  = sTThaiNVu;

                //make a call to client
                response = Client.NhomTaiSanCT(request);

                //Kiem tra ket qua tra ve
                Common.Utilities.ValidResponse(request, response);

                if (response != null && response.ResponseStatus == ApplicationConstant.ResponseStatus.THANH_CONG)
                {
                    kq = true;
                }
                else
                {
                    kq = false;
                }
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex);
                kq = false;
            }
            return(kq);
        }
示例#7
0
        public bool ThongTinTaiSan(DatabaseConstant.Function function, DatabaseConstant.Action action, List <int> lstID, ref TS_TAI_SAN_DTO obj, ref List <ClientResponseDetail> listClientResponseDetail)
        {
            //Kiểm tra kết nối, server, service trước khi request
            Common.Utilities.IsRequestAllow(ApplicationConstant.SystemService.TaiSanService.layGiaTri());
            TaiSanRequest  request  = Common.Utilities.PrepareRequest(new TaiSanServiceRef.TaiSanRequest());
            TaiSanResponse response = new TaiSanServiceRef.TaiSanResponse();

            try
            {
                //Khoi tao request
                request.Function  = function;
                request.Action    = action;
                request.objTS_Dto = obj;
                request.lstID     = lstID.ToArray();

                // make a call to service client
                response = Client.QuanLyTaiSan(request);

                //Kiem tra ket qua tra ve
                Common.Utilities.ValidResponse(request, response);

                if (response != null && response.ResponseStatus == ApplicationConstant.ResponseStatus.THANH_CONG)
                {
                    obj = response.objTS_Dto;
                    return(true);
                }
                else
                {
                    listClientResponseDetail = Common.Utilities.convertToClientResponseDetail(response);
                    return(false);
                }
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex);
                return(false);
            }
        }
示例#8
0
        public DataSet GetDanhSachTaiBanGiao(string sMaDonVi, string sTrangThaiNVu, string sMaTS, string sTenTS,
                                             string sSoBienBan, string sNgaySDTu, string sNgaySDDen, string sMaDonViSD, string sTenDonViSD,
                                             string sStartRow = "0", string sEndRow = "0")
        {
            //Kiểm tra kết nối, server, service trước khi request
            Common.Utilities.IsRequestAllow(ApplicationConstant.SystemService.TaiSanService.layGiaTri());
            TaiSanRequest  request  = Common.Utilities.PrepareRequest(new TaiSanServiceRef.TaiSanRequest());
            TaiSanResponse response = new TaiSanServiceRef.TaiSanResponse();

            try
            {
                //Khoi tao request
                request.Function = DatabaseConstant.Function.TS_BAN_GIAO_DS;
                request.Action   = DatabaseConstant.Action.XEM;

                // make a call to service client
                response = Client.QuanLyTaiSan(request);

                //Kiem tra ket qua tra ve
                Common.Utilities.ValidResponse(request, response);

                if (response != null && response.ResponseStatus == ApplicationConstant.ResponseStatus.THANH_CONG)
                {
                    return(new DataSet());
                }
                else
                {
                    return(null);
                }
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex);
                return(null);
            }
        }
示例#9
0
        public bool LayDanhMucTaiSanTheoLoai(ref List <DMUC_TSAN_DTO> lstDanhMucDto, List <DatabaseConstant.LOAI_DMUC_TSAN> lstMaLoai)
        {
            //Kiểm tra kết nối, server, service trước khi request
            Common.Utilities.IsRequestAllow(ApplicationConstant.SystemService.TaiSanService.layGiaTri());
            TaiSanRequest  request  = Common.Utilities.PrepareRequest(new TaiSanServiceRef.TaiSanRequest());
            TaiSanResponse response = new TaiSanServiceRef.TaiSanResponse();

            try
            {
                //Khoi tao request
                request.lstMaLoai     = lstMaLoai.ToArray();
                request.lstDanhMucDto = lstDanhMucDto.ToArray();


                // make a call to service client
                response = Client.LayDanhMucTheoLoai(request);

                //Kiem tra ket qua tra ve
                Common.Utilities.ValidResponse(request, response);

                if (response != null && response.ResponseStatus == ApplicationConstant.ResponseStatus.THANH_CONG)
                {
                    lstDanhMucDto = response.lstDanhMucDto.ToList();
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex);
                return(false);
            }
        }