예제 #1
0
        public static async Task <ConnectorResponseModel> GetRentDues(UserModel user)
        {
            RentHistory objRentH = HttpClientRQHandler.SendRQ <RentHistory, UserModel>(user, "/GetInvoices");

            if (!(objRentH is RentHistory && objRentH.ResponseStatus.ResponseCode == (int)ResponseCode.Success))
            {
                objRentH = null;
            }
            return(await Task.FromResult(objRentH));
        }
예제 #2
0
        public static async Task <ConnectorResponseModel> ResetPassword(ResetPassword user)
        {
            ResetPasswordDataResponse objRPasswordR = HttpClientRQHandler.SendRQ <ResetPasswordDataResponse, ResetPassword>(user, "/ResetPassword");

            if (!(objRPasswordR is ResetPasswordDataResponse && objRPasswordR.ResponseStatus.ResponseCode == (int)ResponseCode.Success))
            {
                objRPasswordR = null;
            }
            return(await Task.FromResult(objRPasswordR));
        }
예제 #3
0
        public static async Task <ConnectorResponseModel> Authenticate(UserModel user)
        {
            UserModel objUser = new UserModel();

            RentHistory objRentRsp = HttpClientRQHandler.SendRQ <RentHistory, UserModel>(user, "/GetInvoices");

            if (objRentRsp is RentHistory && objRentRsp.ResponseStatus.ResponseCode == (int)ResponseCode.Success)
            {
                objUser = new UserModel()
                {
                    UserName   = user.UserName,
                    Password   = user.Password,
                    CardCode   = objRentRsp.Result.InvoicesData != null && objRentRsp.Result.InvoicesData.Count() > 0 ? objRentRsp.Result.InvoicesData.First().CardCode : string.Empty,
                    CardName   = objRentRsp.Result.InvoicesData != null && objRentRsp.Result.InvoicesData.Count() > 0 ? objRentRsp.Result.InvoicesData.First().CardName : string.Empty,
                    IsLoggedIn = true
                };
            }

            return(await Task.FromResult(objUser));
        }
예제 #4
0
        public static async Task <ConnectorResponseModel> GetAnnouncements(UserModel user)
        {
            AnnouncementDataResponse objAnnouncement = HttpClientRQHandler.SendRQ <AnnouncementDataResponse, UserModel>(user, "/GetAnnouncement");

            return(await Task.FromResult(objAnnouncement));
        }
예제 #5
0
        public static async Task <ServiceReponse> RequestMaintenance(ServiceCallDataResponseResult RQ)
        {
            ServiceReponse objRentRsp = HttpClientRQHandler.SendRQ <ServiceReponse, ServiceCallDataResponseResult>(RQ, "/ServiceCall");

            return(await Task.FromResult(objRentRsp));
        }
예제 #6
0
        public static async Task <RentPayResponseModel> PayRentDue(PaymentHistoryModel Invoices)
        {
            RentPayResponseModel objRentRsp = HttpClientRQHandler.SendRQ <RentPayResponseModel, PaymentHistoryModel>(Invoices, "/IncomingPayments");

            return(await Task.FromResult(objRentRsp));
        }