public ActionResult AreaAdd()
        {
            T_ActivityAreaBll bll = new T_ActivityAreaBll();
            var model             = new T_ActivityArea();

            if (Request.QueryString["areaid"] != null)
            {
                model = bll.GetModel(int.Parse(Request.QueryString["areaid"].ToString()));
            }
            else
            {
                model.IsShow = 1;
            }

            return(View(model));
        }
        public Dictionary <string, object> Add(T_ActivityArea model)
        {
            model.CreateUserId   = ManageProvider.Provider.Current().UserId;
            model.CreateUserName = ManageProvider.Provider.Current().Account;
            model.CreateTime     = DateTime.Now;

            if (model.ActivitAreaId > 0)
            {
                var model1 = bll.GetModel(model.ActivitAreaId);
                model1.ActivityAreaName = model.ActivityAreaName;
                model1.SortCode         = model.SortCode;
                model1.IsShow           = model.IsShow;

                if (bll.Update(model1) > 0)
                {
                    return(new Dictionary <string, object>
                    {
                        { "code", "1" }
                    });
                }
                else
                {
                    return(new Dictionary <string, object>
                    {
                        { "code", "0" }
                    });
                }
            }
            else
            {
                if (bll.Add(model) > 0)
                {
                    return(new Dictionary <string, object>
                    {
                        { "code", "1" }
                    });
                }
                else
                {
                    return(new Dictionary <string, object>
                    {
                        { "code", "0" }
                    });
                }
            }
        }