/// <summary>
        /// Lấy tree view hạn mức khách hàng
        /// Cấu trúc: Chi nhánh -> Khu vực
        /// </summary>
        /// <param name="maDonVi"></param>
        /// <param name="userName"></param>
        /// <returns></returns>
        public DataSet getTreeViewHanMucTong(string maDonVi, string userName)
        {
            // Kiểm tra kết nối, server, service trước khi request
            Common.Utilities.IsRequestAllow(ApplicationConstant.SystemService.TruyVanService.layGiaTri());

            //Khởi tạo và gán các giá trị cho request
            TruyVanServiceRef.TruyVanRequest  request  = Common.Utilities.PrepareRequest(new TruyVanServiceRef.TruyVanRequest());
            TruyVanServiceRef.TruyVanResponse response = new TruyVanServiceRef.TruyVanResponse();
            DataTable dt = null;

            LDatatable.MakeParameterTable(ref dt);
            //LDatatable.AddParameter(ref dt, "@TrangThaiNVU", "STRING", BusinessConstant.TrangThaiNghiepVu.DA_DUYET.layGiaTri());
            //LDatatable.AddParameter(ref dt, "@TrangThaiSDU", "STRING", BusinessConstant.TrangThaiBanGhi.SU_DUNG.layGiaTri());
            LDatatable.AddParameter(ref dt, "@INP_MA_DVI", "string", maDonVi);
            LDatatable.AddParameter(ref dt, "@INP_USER_NAME", "string", userName);

            request.dtThamSo    = dt;
            request.objectName  = "INQ.TREE.KHU_VUC_TDVM";
            request.inquiryName = "TREE_VIEW";

            // Lấy kết quả trả về
            TruyVanServiceClient ClientTruyVan = TruyVanServiceClient(ApplicationConstant.SystemService.TruyVanService);

            response = ClientTruyVan.TruyVanMessage(request);

            // Kiểm tra kết quả trả về
            Common.Utilities.ValidResponse(request, response);

            return(response.dsResult);
        }
        /// <summary>
        /// Lay danh sach tai khoan hach toan
        /// </summary>
        /// <param name="MaNhomTS"></param>
        /// <returns></returns>

        public DataSet GetDSTaiKhoanHachToan(string MaNhomTS)
        {
            // Kiểm tra kết nối, server, service trước khi request
            Common.Utilities.IsRequestAllow(ApplicationConstant.SystemService.TruyVanService.layGiaTri());

            // Khởi tạo và gán các giá trị cho request
            TruyVanRequest request = Common.Utilities.PrepareRequest(new TruyVanServiceRef.TruyVanRequest());

            TruyVanResponse response = new TruyVanServiceRef.TruyVanResponse();
            DataTable       dt       = null;

            LDatatable.MakeParameterTable(ref dt);
            if (MaNhomTS.Equals(""))
            {
                LDatatable.AddParameter(ref dt, "", "", "");
                request.dtThamSo    = dt;
                request.objectName  = "INQ.TS.TAI_KHOAN";
                request.inquiryName = "TAI_KHOAN";
            }
            else
            {
                LDatatable.AddParameter(ref dt, "@MA_NHOM_TS", "String", MaNhomTS);
                request.dtThamSo    = dt;
                request.objectName  = "INQ.TS.TAI_KHOAN";
                request.inquiryName = "MA_NHOM_TS";
            }

            // Lấy kết quả trả về
            response = ClientTruyVan.TruyVanMessage(request);

            // Kiểm tra kết quả trả về
            Common.Utilities.ValidResponse(request, response);

            return(response.dsResult);
        }
        public DataSet GetTaiKhoanHachToan(string maDoiTuong, string maDonVi)
        {
            TruyVanServiceClient client   = null;
            TruyVanRequest       request  = null;
            TruyVanResponse      response = null;

            try
            {
                // Kiểm tra kết nối, server, service trước khi request
                Common.Utilities.IsRequestAllow(ApplicationConstant.SystemService.TruyVanService.layGiaTri());

                client   = TruyVanServiceClient(ApplicationConstant.SystemService.TruyVanService);
                request  = Common.Utilities.PrepareRequest(new TruyVanServiceRef.TruyVanRequest());
                response = new TruyVanServiceRef.TruyVanResponse();

                DataTable dt = null;

                LDatatable.MakeParameterTable(ref dt);
                LDatatable.AddParameter(ref dt, "@MA_PHAN_HE", "STRING", DatabaseConstant.Module.TDTT.getValue());
                LDatatable.AddParameter(ref dt, "@MA_DTUONG", "STRING", maDoiTuong);
                LDatatable.AddParameter(ref dt, "@MA_DON_VI", "STRING", maDonVi);

                request.dtThamSo    = dt;
                request.objectName  = "INQ.CT.TD_SAN_PHAM";
                request.inquiryName = "TAI_KHOAN_HACH_TOAN";


                // make a call to service client here
                response = client.TruyVanMessage(request);

                //Kiểm tra kết quả trả về
                Common.Utilities.ValidResponse(request, response);

                DataSet ds = response.dsResult;
                return(ds);
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
                throw ex;
            }
            finally
            {
                if (client.State == CommunicationState.Faulted)
                {
                    client.Abort();
                }
                else
                {
                    client.Close();
                }

                client   = null;
                request  = null;
                response = null;
            }
        }
        public DataSet GetHanMucChiTiet(string maLoaiDTuong, string maDTuong, string module, string tinhNang)
        {
            TruyVanServiceClient client   = null;
            TruyVanRequest       request  = null;
            TruyVanResponse      response = null;

            try
            {
                // Kiểm tra kết nối, server, service trước khi request
                Common.Utilities.IsRequestAllow(ApplicationConstant.SystemService.TruyVanService.layGiaTri());

                client   = TruyVanServiceClient(ApplicationConstant.SystemService.TruyVanService);
                request  = Common.Utilities.PrepareRequest(new TruyVanServiceRef.TruyVanRequest());
                response = new TruyVanServiceRef.TruyVanResponse();

                //Khởi tạo request
                DataTable dt = null;
                LDatatable.MakeParameterTable(ref dt);
                LDatatable.AddParameter(ref dt, "@MA_DTUONG_LOAI", "STRING", maLoaiDTuong);
                LDatatable.AddParameter(ref dt, "@MA_DTUONG", "STRING", maDTuong);
                LDatatable.AddParameter(ref dt, "@MODULE", "STRING", module);
                LDatatable.AddParameter(ref dt, "@TINH_NANG", "STRING", tinhNang);

                request.dtThamSo    = dt;
                request.objectName  = "INQ.DS.HAN_MUC";
                request.inquiryName = "CHI_TIET";

                // make a call to service client here
                response = client.TruyVanMessage(request);

                //Kiểm tra kết quả trả về
                Common.Utilities.ValidResponse(request, response);

                DataSet ds = response.dsResult;
                return(ds);
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
                throw ex;
            }
            finally
            {
                if (client.State == CommunicationState.Faulted)
                {
                    client.Abort();
                }
                else
                {
                    client.Close();
                }

                client   = null;
                request  = null;
                response = null;
            }
        }
        public DataSet GetDanhSachHanMucKhachHangChiTiet(DataTable dt)
        {
            TruyVanServiceClient client   = null;
            TruyVanRequest       request  = null;
            TruyVanResponse      response = null;

            try
            {
                // Kiểm tra kết nối, server, service trước khi request
                Common.Utilities.IsRequestAllow(ApplicationConstant.SystemService.TruyVanService.layGiaTri());

                client   = TruyVanServiceClient(ApplicationConstant.SystemService.TruyVanService);
                request  = Common.Utilities.PrepareRequest(new TruyVanServiceRef.TruyVanRequest());
                response = new TruyVanServiceRef.TruyVanResponse();

                //Khởi tạo request
                //DataTable dt = null;
                //LDatatable.MakeParameterTable(ref dt);
                //LDatatable.AddParameter(ref dt, "@TRANG_THAI_NVU", "STRING", trangThaiNVu);
                //LDatatable.AddParameter(ref dt, "@MA_DVI", "STRING", maDonVi);

                request.dtThamSo    = dt;
                request.objectName  = "INQ.DS.HMUC_KHACH_HANG_CTIET";
                request.inquiryName = "DANH_SACH";

                // make a call to service client here
                response = client.TruyVanMessage(request);

                //Kiểm tra kết quả trả về
                Common.Utilities.ValidResponse(request, response);

                DataSet ds = response.dsResult;
                return(ds);
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
                throw ex;
            }
            finally
            {
                if (client.State == CommunicationState.Faulted)
                {
                    client.Abort();
                }
                else
                {
                    client.Close();
                }

                client   = null;
                request  = null;
                response = null;
            }
        }
        public DataSet GetResultCT(DataTable dt)
        {
            TruyVanServiceClient client   = null;
            TruyVanRequest       request  = null;
            TruyVanResponse      response = null;

            try
            {
                // Kiểm tra kết nối, server, service trước khi request
                Common.Utilities.IsRequestAllow(ApplicationConstant.SystemService.TruyVanService.layGiaTri());

                client   = TruyVanServiceClient(ApplicationConstant.SystemService.TruyVanService);
                request  = Common.Utilities.PrepareRequest(new TruyVanServiceRef.TruyVanRequest());
                response = new TruyVanServiceRef.TruyVanResponse();

                //Khởi tạo request

                request.dtThamSo    = dt;
                request.objectName  = "INQ.DS.COB";
                request.inquiryName = "RESULT_CT";

                // make a call to service client here
                response = client.TruyVanMessage(request);

                //Kiểm tra kết quả trả về
                Common.Utilities.ValidResponse(request, response);

                DataSet ds = response.dsResult;
                return(ds);
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
                throw ex;
            }
            finally
            {
                if (client.State == CommunicationState.Faulted)
                {
                    client.Abort();
                }
                else
                {
                    client.Close();
                }

                client   = null;
                request  = null;
                response = null;
            }
        }
Exemple #7
0
        public DataSet getDSKhachHangBTV(string idCum, string ngayHienTai, string ngayThu, string idKhang)
        {
            // Kiểm tra kết nối, server, service trước khi request
            Common.Utilities.IsRequestAllow(ApplicationConstant.SystemService.TruyVanService.layGiaTri());
            TruyVanServiceClient ClientTruyVan = TruyVanServiceClient(ApplicationConstant.SystemService.TruyVanService);

            // Khởi tạo và gán các giá trị cho request
            TruyVanServiceRef.TruyVanRequest request = Common.Utilities.PrepareRequest(new TruyVanServiceRef.TruyVanRequest());

            TruyVanServiceRef.TruyVanResponse response = new TruyVanServiceRef.TruyVanResponse();
            try
            {
                DataTable dt = null;

                LDatatable.MakeParameterTable(ref dt);
                LDatatable.AddParameter(ref dt, "@ID_CUM", "String", idCum);
                LDatatable.AddParameter(ref dt, "@NGAY_HIEN_TAI", "String", ngayHienTai);
                LDatatable.AddParameter(ref dt, "@NGAY_THU", "String", ngayThu);
                LDatatable.AddParameter(ref dt, "@ID_KHANG", "String", idKhang);
                request.dtThamSo    = dt;
                request.objectName  = "INQ.POPUP.DS_KHACH_HANG_HDTK_BTV";
                request.inquiryName = "DANH_SACH";

                // Lấy kết quả trả về
                response = ClientTruyVan.TruyVanMessage(request);

                // Kiểm tra kết quả trả về
                Common.Utilities.ValidResponse(request, response);
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
                throw ex;
            }
            finally
            {
                if (ClientTruyVan.State == CommunicationState.Faulted)
                {
                    ClientTruyVan.Abort();
                }
                else
                {
                    ClientTruyVan.Close();
                }
            }
            return(response.dsResult);
        }
Exemple #8
0
        public DataSet getDSSoTKBTV(string maKheUoc, string ngayGDich, string idGDich)
        {
            // Kiểm tra kết nối, server, service trước khi request
            Common.Utilities.IsRequestAllow(ApplicationConstant.SystemService.TruyVanService.layGiaTri());
            TruyVanServiceClient ClientTruyVan = TruyVanServiceClient(ApplicationConstant.SystemService.TruyVanService);

            // Khởi tạo và gán các giá trị cho request
            TruyVanServiceRef.TruyVanRequest request = Common.Utilities.PrepareRequest(new TruyVanServiceRef.TruyVanRequest());

            TruyVanServiceRef.TruyVanResponse response = new TruyVanServiceRef.TruyVanResponse();
            try
            {
                DataTable dt = null;

                LDatatable.MakeParameterTable(ref dt);
                LDatatable.AddParameter(ref dt, "@MA_KUOCVM", "String", maKheUoc);
                LDatatable.AddParameter(ref dt, "@NGAY_GDICH", "String", ngayGDich);
                LDatatable.AddParameter(ref dt, "@ID_GDICH", "String", idGDich);
                request.dtThamSo    = dt;
                request.objectName  = "INQ.DS_SO_TK_HDTK_BTV";
                request.inquiryName = "POPUP";

                // Lấy kết quả trả về
                response = ClientTruyVan.TruyVanMessage(request);

                // Kiểm tra kết quả trả về
                Common.Utilities.ValidResponse(request, response);
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
                throw ex;
            }
            finally
            {
                if (ClientTruyVan.State == CommunicationState.Faulted)
                {
                    ClientTruyVan.Abort();
                }
                else
                {
                    ClientTruyVan.Close();
                }
            }

            return(response.dsResult);
        }
Exemple #9
0
        public DataSet getDSKhachHangBIDV(DataTable dt)
        {
            // Kiểm tra kết nối, server, service trước khi request
            Common.Utilities.IsRequestAllow(ApplicationConstant.SystemService.TruyVanService.layGiaTri());
            TruyVanServiceClient ClientTruyVan = TruyVanServiceClient(ApplicationConstant.SystemService.TruyVanService);

            // Khởi tạo và gán các giá trị cho request
            TruyVanServiceRef.TruyVanRequest request = Common.Utilities.PrepareRequest(new TruyVanServiceRef.TruyVanRequest());

            TruyVanServiceRef.TruyVanResponse response = new TruyVanServiceRef.TruyVanResponse();
            try
            {
                request.typePara    = "UDTT";
                request.type        = "Multi";
                request.dtThamSo    = dt;
                request.objectName  = "INQ.POPUP.DS_KHACH_HANG_HDTK_BIDV";
                request.inquiryName = "%";

                // Lấy kết quả trả về
                response = ClientTruyVan.TruyVanMessage(request);

                // Kiểm tra kết quả trả về
                Common.Utilities.ValidResponse(request, response);
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
                throw ex;
            }
            finally
            {
                if (ClientTruyVan.State == CommunicationState.Faulted)
                {
                    ClientTruyVan.Abort();
                }
                else
                {
                    ClientTruyVan.Close();
                }
            }
            return(response.dsResult);
        }
        public DataSet GetDanhSachTaiSanTang(string sMaDonVi, string sTrangThaiNVu, string sMaTS, string sTenTS,
                                             string sNhomTS, string dNguyenGiaTu, string dNguyenGiaDen, string sNgayNhapTu, string sNgayNhapDen,
                                             string sNgaySDTu, string sNgaySDDen, string sMaNguoiNhan, string sTenNguoiNhan,
                                             string sStartRow = "0", string sEndRow = "0")
        {
            // Kiểm tra kết nối, server, service trước khi request
            Common.Utilities.IsRequestAllow(ApplicationConstant.SystemService.TruyVanService.layGiaTri());

            // Khởi tạo và gán các giá trị cho request
            TruyVanServiceRef.TruyVanRequest request = Common.Utilities.PrepareRequest(new TruyVanServiceRef.TruyVanRequest());

            TruyVanServiceRef.TruyVanResponse response = new TruyVanServiceRef.TruyVanResponse();
            DataTable dt = null;

            LDatatable.MakeParameterTable(ref dt);
            LDatatable.AddParameter(ref dt, "@INP_MA_DON_VI", "STRING", sMaDonVi);
            LDatatable.AddParameter(ref dt, "@INP_TTHAI_NVU", "STRING", sTrangThaiNVu);
            LDatatable.AddParameter(ref dt, "@INP_MA_TAI_SAN", "STRING", sMaTS);
            LDatatable.AddParameter(ref dt, "@INP_TEN_TAI_SAN", "STRING", sTenTS);
            LDatatable.AddParameter(ref dt, "@INP_NHOM_TAI_SAN", "STRING", sNhomTS);
            LDatatable.AddParameter(ref dt, "@INP_NGUYEN_GIA_TU", "STRING", dNguyenGiaTu);
            LDatatable.AddParameter(ref dt, "@INP_NGUYEN_GIA_DEN", "STRING", dNguyenGiaDen);
            LDatatable.AddParameter(ref dt, "@INP_NGAY_NHAP_TU", "STRING", sNgayNhapTu);
            LDatatable.AddParameter(ref dt, "@INP_NGAY_NHAP_DEN", "STRING", sNgayNhapDen);
            LDatatable.AddParameter(ref dt, "@INP_NGAY_SDUNG_TU", "STRING", sNgaySDTu);
            LDatatable.AddParameter(ref dt, "@INP_NGAY_SDUNG_DEN", "STRING", sNgaySDDen);
            LDatatable.AddParameter(ref dt, "@INP_MA_NGUOI_NHAN", "STRING", sMaNguoiNhan);
            LDatatable.AddParameter(ref dt, "@INP_TEN_NGUOI_NHAN", "STRING", sTenNguoiNhan);
            LDatatable.AddParameter(ref dt, "@INP_START_ROW", "INT", sStartRow);
            LDatatable.AddParameter(ref dt, "@INP_END_ROW", "INT", sEndRow);

            request.dtThamSo    = dt;
            request.objectName  = "INQ.DS.TS_TANG.DANH_SACH";
            request.inquiryName = "%";

            // Lấy kết quả trả về
            response = ClientTruyVan.TruyVanMessage(request);
            // Kiểm tra kết quả trả về
            Common.Utilities.ValidResponse(request, response);

            return(response.dsResult);
        }
        public DataSet getTreeView(DataTable dt, string inqName)
        {
            // Kiểm tra kết nối, server, service trước khi request
            Common.Utilities.IsRequestAllow(ApplicationConstant.SystemService.TruyVanService.layGiaTri());

            //Khởi tạo và gán các giá trị cho request
            TruyVanServiceRef.TruyVanRequest  request  = Common.Utilities.PrepareRequest(new TruyVanServiceRef.TruyVanRequest());
            TruyVanServiceRef.TruyVanResponse response = new TruyVanServiceRef.TruyVanResponse();

            request.dtThamSo    = dt;
            request.inquiryName = inqName;
            request.objectName  = inqName;

            // Lấy kết quả trả về
            response = Client.TruyVanMessage(request);

            // Kiểm tra kết quả trả về
            Common.Utilities.ValidResponse(request, response);

            return(response.dsResult);
        }
        public DataSet GetDanhSachHanMuc(DataTable dt)
        {
            // Kiểm tra kết nối, server, service trước khi request
            Common.Utilities.IsRequestAllow(ApplicationConstant.SystemService.TruyVanService.layGiaTri());

            // Khởi tạo và gán các giá trị cho request
            TruyVanServiceRef.TruyVanRequest request = Common.Utilities.PrepareRequest(new TruyVanServiceRef.TruyVanRequest());

            TruyVanServiceRef.TruyVanResponse response = new TruyVanServiceRef.TruyVanResponse();
            request.dtThamSo    = dt;
            request.objectName  = "INQ.DS.HM_HAN_MUC_TONG";
            request.inquiryName = "INQ.DS.HM_HAN_MUC_TONG";

            // Lấy kết quả trả về
            TruyVanServiceClient ClientTruyVan = TruyVanServiceClient(ApplicationConstant.SystemService.TruyVanService);

            response = ClientTruyVan.TruyVanMessage(request);
            // Kiểm tra kết quả trả về
            Common.Utilities.ValidResponse(request, response);

            return(response.dsResult);
        }