Exemple #1
0
        public Result SavePriceDetails(PropertyRentModel model)
        {
            object Params = new
            {
                ExpectedPrice      = model.ExpectedPrice,
                SecurityAmount     = model.SecurityAmount,
                MaintenanceCharges = model.MaintenanceCharges,
                PropertyId         = model.PropertyId
            };

            return(QueryFirst <Result>("SP_SavePriceDetails", Params, CommandType.StoredProcedure));
        }
Exemple #2
0
        public PropertyRentModel SaveRentProperty(PropertyRentModel model)
        {
            try
            {
                var rent = new PropertyRent();
                if (model.PropertyId > 0)
                {
                    rent = _db.PropertyRents.FirstOrDefault(x => x.PropertyId == model.PropertyId);
                }

                rent.Locality           = model.Locality;
                rent.PropertyTypeId     = model.PropertyTypeId;
                rent.SecurityAmount     = model.SecurityAmount;
                rent.MaintenanceCharges = model.MaintenanceCharges;
                rent.Address            = model.Address;
                rent.ADType             = model.ADType;
                rent.Area            = model.Area;
                rent.AU              = model.AU;
                rent.AvailableDate   = model.AvailableDate;
                rent.AvailableStatus = model.AvailableStatus;
                rent.BathroomNum     = model.BathroomNum;
                rent.BikeParking     = model.BikeParking;
                rent.CarParking      = model.CarParking;
                rent.CityId          = model.CityId;
                rent.ExpectedPrice   = model.ExpectedPrice;
                rent.FacingId        = model.FacingId;
                rent.FloorNum        = model.FloorNum;
                rent.FurnishedType   = model.FurnishedType;
                rent.Lift            = model.Lift;
                rent.Mobile          = model.Mobile;
                rent.ProjectSociety  = model.ProjectSociety;
                rent.PropertyName    = model.PropertyName;
                rent.SecurityAmount  = model.SecurityAmount;
                rent.TotalFloor      = model.TotalFloor;
                rent.Water           = model.Water;
                rent.ModifiedDate    = DateTime.UtcNow;
                rent.UserId          = model.UserId;
                rent.BedRooms        = model.BedRooms;

                if (model.PropertyId == 0)
                {
                    _db.PropertyRents.Add(rent);
                }


                _db.SaveChanges();
                model.PropertyId = rent.PropertyId;
                return(model);
            }
            catch { throw; }
        }
Exemple #3
0
        public Result SavePropertyFeatures(PropertyRentModel model)
        {
            object Params = new
            {
                BikeParking = model.BikeParking,
                Lift        = model.Lift,
                Water       = model.Water,
                CarParking  = model.CarParking,
                FacingId    = model.FacingId,
                PropertyId  = model.PropertyId,
            };

            return(QueryFirst <Result>("SP_SavePropertyFeature", Params, CommandType.StoredProcedure));
        }
Exemple #4
0
        public Result SaveBasicDetails(PropertyRentModel model)
        {
            object Params = new
            {
                Locality        = model.Locality,
                PropertyTypeId  = model.PropertyTypeId,
                Area            = model.Area,
                AU              = model.AU,
                ADType          = model.ADType,
                AvailableStatus = model.AvailableStatus,
                AvailableDate   = model.AvailableDate,
                BathroomNum     = model.BathroomNum,
                TotalFloor      = model.TotalFloor,
                FloorNum        = model.FloorNum,
                FurnishedType   = model.FurnishedType,
                CityId          = model.CityId,
                Mobile          = model.Mobile,
                PropertyName    = model.PropertyName,
                BedRooms        = model.BedRooms,
                UserId          = model.UserId
            };

            return(QueryFirst <Result>("SP_SaveBasicDetails", Params, CommandType.StoredProcedure));
        }
        public IActionResult BasicDetails(int Id)
        {
            PropertyRentModel model = _property.GetMasterData();

            return(View("_BasicDetails", model));
        }
 public Result SavePriceDetails(PropertyRentModel model)
 {
     return(_property.SavePriceDetails(model));
 }
 public Result SavePropertyFeatures(PropertyRentModel model)
 {
     return(_property.SavePropertyFeatures(model));
 }
Exemple #8
0
 public static PropertyRent ToEntity(this PropertyRentModel createmodel, PropertyRent destination)
 {
     return(createmodel.MapTo(destination));
 }
Exemple #9
0
 public static PropertyRent ToEntity(this PropertyRentModel createmodel)
 {
     return(createmodel.MapTo <PropertyRentModel, PropertyRent>());
 }
Exemple #10
0
 public PropertyRentModel SaveProperty(PropertyRentModel model)
 {
     return(_rent.SaveRentProperty(model));
 }