Ejemplo n.º 1
0
        //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)));
        }
Ejemplo n.º 2
0
        public static bool AddCity(string name)
        {
            CityDTO cDTO = new CityDTO();

            cDTO.CityName = name;
            return(PropertyDAL.AddCity(CityDTO.ToDAL(cDTO)));
        }
Ejemplo n.º 3
0
    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);
        }
Ejemplo n.º 5
0
        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);
        }
Ejemplo n.º 6
0
 public static bool AddStreet(StreetDTO sDTO)
 {
     return(PropertyDAL.AddStreet(StreetDTO.ToDAL(sDTO)));
 }
Ejemplo n.º 7
0
        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));
        }
Ejemplo n.º 8
0
    public void AddProperty(PropertyModel prop)
    {
        PropertyDAL propDal = new PropertyDAL();

        propDal.AddNewProperty(prop);
    }