public FollowOnBookingResult BookFollowOn(string fromId, string clientRef, DateTime requestedDate, string username, string password, int engineerId, string bookingReason, string url) { OnlineBookingService.IFzOnlineBookingservice OBS = new IFzOnlineBookingservice(); OBS.Url = url; OnlineBookingService.TOnlineBookFollowOnDetails request = new TOnlineBookFollowOnDetails(); request.UserName = username.ToUpper(); request.Password = bookingPwd; request.FromID = fromId; request.ClientRef = clientRef; request.SelectedDate = requestedDate; request.EngineerID = engineerId; // request.Reason = bookingReason; OnlineBookingService.TOnlineBookFollowOnResponseDetails response = OBS.BookFollowOn(request); FollowOnBookingResult result = new FollowOnBookingResult(); result.uid = 1; result.booked = response.Booked; result.clientRef = response.ClientRef; if (response.Booked) { result.bookedDate = requestedDate; } return(result); }
public List <FollowOnAvailable> FindAvailableFollowOnCall(string fromId, string clientRef, DateTime requestedDate, string username, string password, string url) { OnlineBookingService.IFzOnlineBookingservice OBS = new IFzOnlineBookingservice(); OBS.Url = url; OnlineBookingService.TFollowOnAvailableRequestDetails request = new TFollowOnAvailableRequestDetails(); request.UserName = username.ToUpper(); request.Password = username; request.FromID = fromId; request.ClientRef = clientRef; request.RequestedDate = requestedDate; OnlineBookingService.TFollowOnAvailableResponseDetails response = OBS.FollowOnAvailabilityRequest(request); List <FollowOnAvailable> list = new List <FollowOnAvailable>(); if (response.RequestSuccess) { int uid = 1; foreach (OnlineBookingService.TFollowOnOneAvailableResult availableResult in response.AvailableList) { FollowOnAvailable item = new FollowOnAvailable(); item.uid = uid++; item.engineerId = availableResult.EngineerID; item.travelDistance = Convert.ToInt32(availableResult.TravelDistance); item.availableDate = availableResult.AvailableDate; list.Add(item); } } else { throw new Exception(String.Format("FollowOnAvailability {0} : {1}", response.ErrorCode, response.ErrorText)); } return(list); }
public int UpdateRoutePositions(List <Classes.TRoutePos> list) { OnlineBookingService.IFzOnlineBookingservice OBS = new IFzOnlineBookingservice(); TRoutePosition[] routePositions = new TRoutePosition[list.Count]; for (int i = 0; i < list.Count; i++) { routePositions[i] = new TRoutePosition() { ServiceID = list[i].ServiceID, RoutePos = list[i].RoutePos }; } return(OBS.UpdateRoutePositions(routePositions)); }
public CourierRMABLL() { _dal = new CourierRMADataProvider(); Clientdal = new ClientDataProvider(); onlineClient = new IFzOnlineBookingservice(); // onlineClient = new CourierRMAService(); // The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Basic'. //onlineClient.ClientCredentials.UserName.Password = "******"; //onlineClient.ClientCredentials.UserName.UserName = "******"; // onlineClient.Credentials = new ClientCredentials( //System.Net.CredentialCache sysCredentail = new System.Net.CredentialCache(); //NetworkCredential netCred = new NetworkCredential("SONY3C", "SONCAIR432"); //sysCredentail.Add(new Uri(strSysURL), "Basic", netCred); //onlineClient.Credentials = sysCredentail; // ascService = new IFzOnlineBooking(); //ascService.ClientCredentials onlineBookingLogBLL = new OnlineBookingLogBLL(); //header = new AuthHeader(); Saediclient = new Client(); }