コード例 #1
0
 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)));
 }
コード例 #2
0
ファイル: Location.cs プロジェクト: EPTamminga/Conference
       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;
       }
コード例 #3
0
ファイル: Location.cs プロジェクト: workcontrolgit/Conference
        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);
        }
コード例 #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;
            }
        }
コード例 #5
0
ファイル: LocationBase.cs プロジェクト: EPTamminga/Conference
        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;

        }