public static bool LogOff() { try { ClientExtenctions.Post(string.Concat(UserUrl, "LogOff")); return(true); } catch (Exception) { return(false); } }
public static bool Register(Company company) { try { ClientExtenctions.PostData(company, string.Concat(UserUrl, "Register")); return(true); } catch (Exception) { return(false); } }
public static bool CompleteRent(Rent rent) { try { ClientExtenctions.PostData(rent, string.Concat(RentUrl, "CompleteRent")); return(true); } catch (Exception) { return(false); } }
public static bool Login(Company loginModel) { try { ClientExtenctions.PostData(loginModel, string.Concat(UserUrl, "Login")); return(true); } catch (Exception) { return(false); } }
public static bool AddPlaneModel(PlaneModel planeModel) { try { ClientExtenctions.PostData(planeModel, string.Concat(PlaneUrl, "AddPlaneModel")); return(true); } catch (Exception) { return(false); } }
public static UserViewModel GetCurrentUser() { return(ClientExtenctions.GetResult <UserViewModel>(string.Concat(UserUrl, "GetCurrentUser"))); }
public static List <Rent> GetRentsOfCompany(int companyId) { return(ClientExtenctions.GetResult <List <Rent> >(string.Concat(RentUrl, $"GetRentsOfCompany?companyId={companyId}"))); }
public static Rent GetRentDetailsById(int rentId) { return(ClientExtenctions.GetResult <Rent>(string.Concat(RentUrl, $"GetRentDetailsById?rentId={rentId}"))); }
public static List <Plane> GetAvailablePlanes(PlaneViewModel model) { return(ClientExtenctions.PostDataAndGetResult <PlaneViewModel, List <Plane> >(model, string.Concat(PlaneUrl, "GetAvailablePlanes"))); }
public static List <Plane> GetPlanesOfCompany(int companyId) { return(ClientExtenctions.GetResult <List <Plane> >(string.Concat(PlaneUrl, $"GetPlanesOfCompany?companyId={companyId}"))); }
public static Plane GetPlaneById(int planeId) { return(ClientExtenctions.GetResult <Plane>(string.Concat(PlaneUrl, $"GetPlaneById?planeId={planeId}"))); }
public static List <PlaneModel> GetPlaneModels() { return(ClientExtenctions.GetResult <List <PlaneModel> >(string.Concat(PlaneUrl, "GetPlaneModels"))); }