Exemple #1
0
 public virtual void Update(ActivityDataModel activity)
 {
     if (activity.ID > 0)
     {
         ActivityDAL.Update(activity);
     }
     else
     {
         throw new Exception("Page not found");
     }
 }
        public ResponseStatus UpdateActivity(HttpRequestBase req)
        {
            ResponseStatus resp = ResponseStatus.NONE;
            Activity       atvy = null;

            if (this.CreateInstance(req, ref atvy))
            {
                activityDal = new ActivityDAL();
                if (activityDal.Update(atvy))
                {
                    resp = ResponseStatus.SUCCESS;
                }
                else
                {
                    resp = ResponseStatus.FAILED;
                }
            }
            else
            {
                resp = ResponseStatus.FAILED;
            }
            return(resp);
        }