//public static RentalDTO GetRentalByPropertyID(int id) //{ // using (ArgamanExpressEntities db = new ArgamanExpressEntities()) // { // Rental rental = db.Rentals.FirstOrDefault(r => r.PropertyID == id); // return new RentalDTO(rental); // } //} //public static RentalDTO GetRentalBySubPropertyID(int id) //{ // using (ArgamanExpressEntities db = new ArgamanExpressEntities()) // { // Rental rental = db.Rentals.FirstOrDefault(r => r.SubPropertyID == id); // return new RentalDTO(rental); // } //} public static bool AddExclusivityPerson(string name) { ExclusivityPersonDTO epDTO = new ExclusivityPersonDTO(); epDTO.ExclusivityName = name; return(PropertyDAL.AddExclusivityPerson(ExclusivityPersonDTO.ToDAL(epDTO))); }
public static bool AddCity(string name) { CityDTO cDTO = new CityDTO(); cDTO.CityName = name; return(PropertyDAL.AddCity(CityDTO.ToDAL(cDTO))); }
private void SetAdditionalData() { if (CompanyID != 0) { CompanyDAL comp = new CompanyDAL(); _CompanyInfo = comp.GetCompany(CompanyID); PropertyDAL prop = new PropertyDAL(); _PropertyInfo = prop.GetProperties(CompanyID); } }
public void AddPropertyTest() { PropertyDAL propertyDAL = new PropertyDAL(connectionString); Property property = new Property() { OwnerID = 2, ManagerID = 1, PropertyName = "Test Paradise", PropertyType = "Triplex", NumberOfUnits = 3 }; bool result = propertyDAL.AddProperty(property); Assert.IsTrue(result); }
public static bool AddProperty(PropertyDTO d) { d.status = true; Property p = PropertyDTO.Todal(d); int id = PropertyDAL.AddProperty(p); if (id != 0) { if (d.Dock != null) { Document doc = new Document(); doc.DocCoding = d.Dock; doc.DocUser = id; doc.type = 1; doc.DocName = d.DocName; DocumentBL.AddUserDocuments(new DocumentDTO(doc)); } return(true); } return(false); }
public static bool AddStreet(StreetDTO sDTO) { return(PropertyDAL.AddStreet(StreetDTO.ToDAL(sDTO))); }
public static List <PropertyDTO> Search(string cityName, string streetName, string number, Nullable <int> floor, Nullable <bool> isRented) { List <Property> pro = PropertyDAL.Search(cityName, streetName, number, floor, isRented); return(ConvertListToDTO(pro)); }
public void AddProperty(PropertyModel prop) { PropertyDAL propDal = new PropertyDAL(); propDal.AddNewProperty(prop); }