public ResponseSingleModel <UserProfile> DeviceRegistration(string mobileNo, out string message) { var result = new ResponseSingleModel <UserProfile>(); message = string.Empty; UserProfile user = new UserProfile(); user.mobilenumber = mobileNo; user.OTP = CommonFunction.GenerateOTP(); long identity; if (instance.InsertUpdateUserDetails(user, out identity, out message)) { user.userid = identity; var cmp = new Company() { UserId = identity }; new CompanyRepository(identity).CompanyRegistration(cmp, out message); result.Response = user; result.Status = Constants.WebApiStatusOk; result.Message = message; } else { result.Status = Constants.WebApiStatusFail; result.Message = message; } return(result); }
public ResponseSingleModel <PostingDetails> PostingDetailCreation(PostingDetails postingDetails, out string message) { var result = new ResponseSingleModel <PostingDetails>(); long dtlpostingid; message = string.Empty; if (this.instance.InsertUpdatePostingDetails(postingDetails, out dtlpostingid, out message)) { var ds = this.instance.GetByPostingDetailsId(postingDetails.postingid, out message); var dsPhotos = this.instance.GetByPostingPhotosById(postingDetails.postingid, out message); var lstProfile = DataAccessUtility.ConvertToList <QTrans.Models.ViewModel.Posting.PostingProfileView>(ds.Tables[0]); var lstDetails = DataAccessUtility.ConvertToList <PostingDetails>(ds.Tables[1]); var lstPostingPhotos = DataAccessUtility.ConvertToList <PostingPhotos>(dsPhotos.Tables[0]); postingDetails = lstDetails.Count > 0 ? lstDetails[0] : null; postingDetails.postingProfile = lstProfile.Count > 0 ? lstProfile[0] : null; postingDetails.dtlpostingid = dtlpostingid; postingDetails.PostingPhotoList = lstPostingPhotos; result.Response = postingDetails; result.Status = Constants.WebApiStatusOk; result.Message = message; } else { result.Status = Constants.WebApiStatusFail; result.Message = message; } return(result); }
public ResponseSingleModel <UserVehicle> GetVehicleByMobile(string mobilenumber) { var response = new ResponseSingleModel <UserVehicle>(); var ds = this.instance.GetByMobile(mobilenumber); UserVehicle userVehicle; if (ds.Tables[0].Rows.Count > 0) { userVehicle = DataAccessUtility.ConvertToList <UserVehicle>(ds.Tables[0])[0]; if (ds.Tables[1].Rows.Count > 0) { userVehicle.vehicles = DataAccessUtility.ConvertToList <Vehicle>(ds.Tables[1]); } else { userVehicle.vehicles = null; } } else { userVehicle = null; } response.Response = userVehicle; response.Status = Constants.WebApiStatusOk; return(response); }
//GetByUserIdDtlPostingId public ResponseSingleModel <BiddingProfile> GetBiddingDetailByUserIddtlPostingId(long UserId, long dtlPostingid) { var response = new ResponseSingleModel <BiddingProfile>(); var ds = this.instanceBidding.GetByUserIdDtlPostingId(UserId, dtlPostingid); BiddingProfile biddingProfile; if (ds.Tables[0].Rows.Count > 0) { biddingProfile = DataAccessUtility.ConvertToList <BiddingProfile>(ds.Tables[0])[0]; if (ds.Tables[1].Rows.Count > 0) { biddingProfile.biddingDetails = DataAccessUtility.ConvertToList <BiddingDetails>(ds.Tables[1]); } else { biddingProfile.biddingDetails = null; } } else { biddingProfile = null; } response.Response = biddingProfile; response.Status = Constants.WebApiStatusOk; return(response); }
public ResponseSingleModel <BiddingProfile> BiddingSubmition(BiddingProfile bidding, out string message) { ResponseSingleModel <BiddingProfile> response = new ResponseSingleModel <BiddingProfile>(); long biddingId = 0; message = string.Empty; if (this.instanceBidding.InsertUpdateBiddingDetails(bidding, out biddingId, out message)) { bidding.biddingid = biddingId; foreach (var details in bidding.biddingDetails) { details.biddingid = biddingId; } response.Response = bidding; response.Message = message; response.Status = Constants.WebApiStatusOk; } else { response.Message = message; response.Status = Constants.WebApiStatusFail; } return(response); }
public ResponseSingleModel <bool> SubmitRatingByDtlPostId(long dtlpostId, long userId, Int16 rating, string comments, Int16 isRate, long CreatedBy) { var result = new ResponseSingleModel <bool>(); result.Response = this.instance.RatingByDtlPostUserId(dtlpostId, userId, rating, comments, isRate, CreatedBy); result.Status = Constants.WebApiStatusOk; return(result); }
public ResponseSingleModel <bool> DeleteAreaPeference(long userId, int cityId) { var response = new ResponseSingleModel <bool>(); response.Response = instance.DeleteAreaPeference(userId, cityId); response.Status = Constants.WebApiStatusOk; return(response); }
public ResponseSingleModel <bool> UpdatePostingStatus(long dtlpostId, Int16 PostStatus) { var result = new ResponseSingleModel <bool>(); result.Response = this.instance.UpdatePostingStatus(dtlpostId, PostStatus); result.Status = Constants.WebApiStatusOk; return(result); }
public ResponseSingleModel <bool> BiddingStatusByBiddingId(long biddingId, long userId, Int16 BidStatus, string reason) { var response = new ResponseSingleModel <bool>(); var result = this.instanceBidding.BiddingStatusByBiddingId(biddingId, userId, BidStatus, reason); response.Response = result; response.Status = Constants.WebApiStatusOk; return(response); }
public ResponseSingleModel <bool> AssignTruck(long dtlbiddingId, long vehicleid, string drivername, string drivernumber) { var response = new ResponseSingleModel <bool>(); var result = this.instanceBidding.AssignTruck(dtlbiddingId, vehicleid, drivername, drivernumber); response.Response = result; response.Status = Constants.WebApiStatusOk; return(response); }
public ResponseSingleModel <bool> BiddingStatusByUserId(long dtlpostingId, long userId, Int16 BidStatus) { var response = new ResponseSingleModel <bool>(); var result = this.instanceBidding.BiddingStatusByUserId(dtlpostingId, userId, BidStatus); response.Response = result; response.Status = Constants.WebApiStatusOk; return(response); }
public ResponseSingleModel <bool> SubmitRatingByDtlPostId(long dtlpostId, long userId, Int16 rating, string comments, Int16 isRate) { var response = new ResponseSingleModel <bool>(); var result = this.instanceBidding.RatingByDtlPostUserId(dtlpostId, userId, rating, comments, isRate); response.Response = result; response.Status = Constants.WebApiStatusOk; return(response); }
public ResponseSingleModel <bool> UpdateBidTruckStatus(long dtlbiddingid, short status, long vehicleId, string drivername, string mobilenumber) { var response = new ResponseSingleModel <bool>(); var result = this.instanceBidding.UpdateBidTruckStatus(dtlbiddingid, status, vehicleId, drivername, mobilenumber); response.Response = result; response.Status = Constants.WebApiStatusOk; return(response); }
public ResponseSingleModel <bool> UserTypeRegistration(long userId, long companyId, int userType, out string message) { var result = new ResponseSingleModel <bool>(); message = string.Empty; result.Response = instance.InsertUserCompanyMapping(userId, companyId, userType, out message); result.Status = Constants.WebApiStatusOk; result.Message = message; return(result); }
public ResponseSingleModel <bool> ChangePassword(string mobileNo, string emailAddress, string oldPassword, string password, out string message) { var result = new ResponseSingleModel <bool>(); message = string.Empty; result.Response = instance.UpdateUserPassword(mobileNo, emailAddress, oldPassword, password, out message); result.Status = Constants.WebApiStatusOk; result.Message = message; return(result); }
public ResponseSingleModel <ProductInstallDetails> GetInstallProductById(long DtlProductId, long productId, long vehicleId) { var response = new ResponseSingleModel <ProductInstallDetails>(); var dt = this.instance.GetInstallProductById(DtlProductId, productId, vehicleId); response.Response = DataAccessUtility.ConvertToList <ProductInstallDetails>(dt)[0]; response.Status = Constants.WebApiStatusOk; return(response); }
public ResponseSingleModel <Product> GetById(long productId) { var response = new ResponseSingleModel <Product>(); var dt = this.instance.GetById(productId); response.Response = DataAccessUtility.ConvertToList <Product>(dt)[0]; response.Status = Constants.WebApiStatusOk; return(response); }
public ResponseSingleModel <Vehicle> GetVehicleById(long vehicleId) { var response = new ResponseSingleModel <Vehicle>(); var dt = this.instance.GetById(vehicleId); Vehicle vehicle = DataAccessUtility.ConvertToList <Vehicle>(dt)[0]; response.Response = vehicle; response.Status = Constants.WebApiStatusOk; return(response); }
public ResponseSingleModel <InsuranceDetails> GetInsuranceById(long vehicleId, long insuranceId) { var response = new ResponseSingleModel <InsuranceDetails>(); var dt = this.instance.GetInsuranceById(vehicleId, insuranceId); InsuranceDetails insuranceDetails = DataAccessUtility.ConvertToList <InsuranceDetails>(dt)[0]; response.Response = insuranceDetails; response.Status = Constants.WebApiStatusOk; return(response); }
public ResponseSingleModel <PostingSummary> GetPostingSummary(long userId) { var result = new ResponseSingleModel <PostingSummary>(); var dt = this.instance.GetPostingSummary(UserId); var lst = DataAccessUtility.ConvertToList <PostingSummary>(dt); PostingSummary summary = lst.Count > 0 ? lst[0] : null; result.Response = summary; result.Status = summary != null ? Constants.WebApiStatusOk : Constants.WebApiStatusFail; result.Message = ""; return(result); }
public ResponseSingleModel <BiddingProfile> GetBiddingDetailById(long biddingId) { var response = new ResponseSingleModel <BiddingProfile>(); var ds = this.instanceBidding.GetById(biddingId); BiddingProfile biddingProfile = DataAccessUtility.ConvertToList <BiddingProfile>(ds.Tables[0])[0]; biddingProfile.biddingDetails = DataAccessUtility.ConvertToList <BiddingDetails>(ds.Tables[1]); response.Response = biddingProfile; response.Status = Constants.WebApiStatusOk; return(response); }
public ResponseSingleModel <Company> GetCompanyDetailByUserId(long userId, out string message) { var result = new ResponseSingleModel <Company>(); message = string.Empty; var dt = this.instance.GetByUserId(userId, out message); var lst = DataAccessUtility.ConvertToList <Company>(dt); result.Response = lst != null && lst.Count > 0 ? lst[0] : null; result.Status = lst != null && lst.Count > 0 ? Constants.WebApiStatusOk : Constants.WebApiStatusFail; result.Message = message; return(result); }
public ResponseSingleModel <PostingProfileView> GetPostingProfileById(long postingId, out string message) { var result = new ResponseSingleModel <PostingProfileView>(); message = string.Empty; var dt = this.instance.GetById(postingId, out message); var lstProfile = DataAccessUtility.ConvertToList <QTrans.Models.ViewModel.Posting.PostingProfileView>(dt); result.Response = lstProfile != null && lstProfile.Count > 0 ? lstProfile[0] : null;; result.Status = Constants.WebApiStatusOk; result.Message = message; return(result); }
/// <summary> /// Get Min Max Amount of bidding by DtlPostId. /// </summary> /// <param name="dtlpostId"></param> /// <returns>return bid min max amount and total bid</returns> public ResponseSingleModel <BidMinMaxAmount> GetBidMinMaxByDtlPostId(long dtlpostId) { var response = new ResponseSingleModel <BidMinMaxAmount>(); var dt = this.instanceBidding.GetMinMaxBidAmount(dtlpostId); var result = DataAccessUtility.ConvertToList <BidMinMaxAmount>(dt); response.Response = result != null && result.Count > 0 ? result[0] : new BidMinMaxAmount() { dtlpostingid = dtlpostId }; response.Status = Constants.WebApiStatusOk; return(response); }
public ResponseSingleModel <UserProfile> Login(string username, string password, out string message) { var result = new ResponseSingleModel <UserProfile>(); message = string.Empty; var dt = instance.UserLogIn(username, password, out message); var lst = DataAccessUtility.ConvertToList <UserProfile>(dt); UserProfile user = lst != null && lst.Count > 0 ? lst[0] : null; result.Response = user; result.Status = user != null ? Constants.WebApiStatusOk : Constants.WebApiStatusFail; result.Message = message; return(result); }
public ResponseSingleModel <UserProfile> GetUserDetailByToken(string token, out string message) { var result = new ResponseSingleModel <UserProfile>(); message = string.Empty; var dt = instance.GetBytoken(token, out message); var lst = DataAccessUtility.ConvertToList <UserProfile>(dt); UserProfile user = lst != null && lst.Count > 0 ? lst[0] : null; result.Response = user; result.Status = user != null ? Constants.WebApiStatusOk : Constants.WebApiStatusFail; result.Message = message; return(result); }
public ResponseSingleModel <int> updateRcPhoto(Int64 truckId, Int64 userID, string filePath, bool isDefault, out string message) { try { var result = new ResponseSingleModel <int>(); result.Response = instance.updateRcPhoto(truckId, userID, filePath, isDefault, out message); result.Status = result.Response > 0 ? Constants.WebApiStatusOk : Constants.WebApiStatusFail; result.Message = message; return(result); } catch (Exception exp) { throw exp; } }
public ResponseSingleModel <int> UpdateIdentityDocument(Int64 userID, string documentType, string filePath, out string message) { try { var result = new ResponseSingleModel <int>(); result.Response = instance.UpdateIdentityDocument(userID, documentType, filePath, out message); result.Status = result.Response > 0 ? Constants.WebApiStatusOk : Constants.WebApiStatusFail; result.Message = message; return(result); } catch (Exception exp) { throw exp; } }
public ResponseSingleModel <bool> UpdateMobileEmailVerification(string mobilenumber, string emailaddres, bool isMobile, int OTP, out long userid, out string token, out string message) { var result = new ResponseSingleModel <bool>(); message = string.Empty; token = string.Empty; userid = 0; if (instance.UpdateMobileEmailVerification(mobilenumber, emailaddres, isMobile, OTP, out message)) { token = EncryptDecryptHelper.ComputePasswordHash(isMobile ? mobilenumber : emailaddres, isMobile ? mobilenumber : emailaddres); result.Response = instance.UpdateToken(mobilenumber, emailaddres, token, out userid, out message); } result.Status = result.Response ? Constants.WebApiStatusOk : Constants.WebApiStatusFail; result.Message = message; return(result); }
public ResponseSingleModel <bool> DeleteVahicalById(long vehicleId, out string message) { var response = new ResponseSingleModel <bool>(); if (this.instance.DeleteById(vehicleId, out message)) { response.Response = true; response.Status = Constants.WebApiStatusOk; response.Message = ""; } else { response.Response = false; response.Status = Constants.WebApiStatusFail; response.Message = message; } return(response); }