public ActionResult Edit(LocationBase location)
 {
     var previousRecord = _repository.GetLocation(location.ConferenceId, location.LocationId);
     if (previousRecord == null)
     {
         _repository.AddLocation(ref location, User.UserID);
     }
     else
     {
         location.CreatedOnDate = previousRecord.CreatedOnDate;
         location.CreatedByUserID = previousRecord.CreatedByUserID;
         _repository.UpdateLocation(location, User.UserID);
     }
     return ReturnRoute(location.ConferenceId, View("View", _repository.GetLocation(location.ConferenceId, location.LocationId)));
 }
Esempio n. 2
0
       public LocationBase GetLocationBase()
       {
           LocationBase res = new LocationBase();
            res.LocationId = LocationId;
            res.ConferenceId = ConferenceId;
            res.Name = Name;
            res.Description = Description;
            res.Capacity = Capacity;
            res.Sort = Sort;
            res.BackgroundColor = BackgroundColor;
 res.CreatedByUserID = CreatedByUserID;
 res.CreatedOnDate = CreatedOnDate;
 res.LastModifiedByUserID = LastModifiedByUserID;
 res.LastModifiedOnDate = LastModifiedOnDate;
           return res;
       }
Esempio n. 3
0
        public LocationBase GetLocationBase()
        {
            LocationBase res = new LocationBase();

            res.LocationId           = LocationId;
            res.ConferenceId         = ConferenceId;
            res.Name                 = Name;
            res.Description          = Description;
            res.Capacity             = Capacity;
            res.Sort                 = Sort;
            res.BackgroundColor      = BackgroundColor;
            res.CreatedByUserID      = CreatedByUserID;
            res.CreatedOnDate        = CreatedOnDate;
            res.LastModifiedByUserID = LastModifiedByUserID;
            res.LastModifiedOnDate   = LastModifiedOnDate;
            return(res);
        }
Esempio n. 4
0
        public void ReadLocationBase(LocationBase location)
        {
            if (location.LocationId > -1)
            {
                LocationId = location.LocationId;
            }

            if (location.ConferenceId > -1)
            {
                ConferenceId = location.ConferenceId;
            }

            if (!String.IsNullOrEmpty(location.Name))
            {
                Name = location.Name;
            }

            if (!String.IsNullOrEmpty(location.Description))
            {
                Description = location.Description;
            }

            if (location.Capacity > -1)
            {
                Capacity = location.Capacity;
            }

            if (location.Sort > -1)
            {
                Sort = location.Sort;
            }

            if (!String.IsNullOrEmpty(location.BackgroundColor))
            {
                BackgroundColor = location.BackgroundColor;
            }
        }
Esempio n. 5
0
        public void ReadLocationBase(LocationBase location)
        {
            if (location.LocationId > -1)
                LocationId = location.LocationId;

            if (location.ConferenceId > -1)
                ConferenceId = location.ConferenceId;

            if (!String.IsNullOrEmpty(location.Name))
                Name = location.Name;

            if (!String.IsNullOrEmpty(location.Description))
                Description = location.Description;

            if (location.Capacity > -1)
                Capacity = location.Capacity;

            if (location.Sort > -1)
                Sort = location.Sort;

            if (!String.IsNullOrEmpty(location.BackgroundColor))
                BackgroundColor = location.BackgroundColor;

        }