public ActionResult ActivityEdit(ActivityBuild model)
        {
            if (model.id == 0)
            {
                if (!string.IsNullOrEmpty(model.Content))
                {
                    bool result = ActivityManager.InsertActivityBuild(model);
                    return(Json(result));
                }
            }
            else
            {
                if (!string.IsNullOrEmpty(model.Content))
                {
                    string activityMenu = JsonConvert.SerializeObject(ActivityMenuBll.GetList(model.id.ToString()));
                    string activityHome = JsonConvert.SerializeObject(ActivityHomeBll.GetList(model.id.ToString()));
                    model.ActivityHome = activityHome;
                    model.ActivityMenu = activityMenu;

                    bool result = ActivityManager.UpdateActivityBuild(model, model.id);

                    return(Json(result));
                }
            }
            return(Json(false));
        }
 public ActionResult List(string activityID)
 {
     if (activityID != "0")
     {
         IEnumerable <ActivityMenu> list = ActivityMenuBll.GetList(activityID).Rows.Cast <DataRow>().Select(row => new ActivityMenu(row));
         if (list.Count() > 0)
         {
             return(View(list));
         }
         else
         {
             return(View());
         }
     }
     else
     {
         return(View());
     }
 }