Пример #1
0
 public static bool LogOff()
 {
     try
     {
         ClientExtenctions.Post(string.Concat(UserUrl, "LogOff"));
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Пример #2
0
 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);
     }
 }
Пример #4
0
 public static bool Login(Company loginModel)
 {
     try
     {
         ClientExtenctions.PostData(loginModel, string.Concat(UserUrl, "Login"));
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Пример #5
0
 public static bool AddPlaneModel(PlaneModel planeModel)
 {
     try
     {
         ClientExtenctions.PostData(planeModel, string.Concat(PlaneUrl, "AddPlaneModel"));
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Пример #6
0
 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}")));
 }
Пример #9
0
 public static List <Plane> GetAvailablePlanes(PlaneViewModel model)
 {
     return(ClientExtenctions.PostDataAndGetResult <PlaneViewModel, List <Plane> >(model, string.Concat(PlaneUrl, "GetAvailablePlanes")));
 }
Пример #10
0
 public static List <Plane> GetPlanesOfCompany(int companyId)
 {
     return(ClientExtenctions.GetResult <List <Plane> >(string.Concat(PlaneUrl, $"GetPlanesOfCompany?companyId={companyId}")));
 }
Пример #11
0
 public static Plane GetPlaneById(int planeId)
 {
     return(ClientExtenctions.GetResult <Plane>(string.Concat(PlaneUrl, $"GetPlaneById?planeId={planeId}")));
 }
Пример #12
0
 public static List <PlaneModel> GetPlaneModels()
 {
     return(ClientExtenctions.GetResult <List <PlaneModel> >(string.Concat(PlaneUrl, "GetPlaneModels")));
 }