Пример #1
0
        //返回culture对象
        private culture generateCulture(dynamic d)
        {
            culture n = new culture();

            n.id             = d["id"].ToString();
            n.cityId         = d["cityId"].ToString();
            n.cityName       = d["cityName"].ToString();
            n.cultureType    = d["cultureType"].ToString();
            n.cultureTitle   = d["cultureTitle"].ToString();
            n.cultureCover   = util.generateImage(d["cultureCover"].ToString());
            n.cultureContent = d["cultureContent"].ToString();
            n.cultureAuthor  = d["cultureAuthor"].ToString();
            n.cultureBrief   = d["cultureBrief"].ToString();
            n.state          = Convert.ToInt32(d["state"].ToString());
            n.readNum        = Convert.ToInt32(d["readNum"].ToString());
            n.collectNum     = Convert.ToInt32(d["collectNum"].ToString());
            n.isRecommend    = Convert.ToInt32(d["isRecommend"].ToString());
            n.updator        = d["updator"].ToString();
            n.updatorName    = d["updatorName"].ToString();
            n.update_time    = d["update_time"].ToString();
            n.creator        = d["creator"].ToString();
            n.creatorName    = d["creatorName"].ToString();
            n.typeName       = d["typeName"].ToString();
            n.create_time    = d["create_time"].ToString();

            return(n);
        }
Пример #2
0
        public ActionResult Update(culture info)
        {
            CultureManager cm     = new CultureManager();
            bool           result = cm.Update(info);

            if (result)
            {
                return(Redirect("/LiuXinPeng/Culture/Culture"));
            }
            else
            {
                return(Content("修改失败"));
            }
        }
Пример #3
0
        public ActionResult Add(culture info)
        {
            CultureManager clm    = new CultureManager();
            bool           result = clm.Add(info);

            if (result)
            {
                return(Redirect("/LiuXinPeng/Culture/Culture"));
            }
            else
            {
                return(Content("新增失败"));
            }
        }
Пример #4
0
        public ActionResult Update(int id)
        {
            UserManager um   = new UserManager();
            List <User> list = um.GetAll();

            ViewData["User"] = list;

            ImageManager im    = new ImageManager();
            List <Image> lists = im.GetAll();

            ViewData["Image"] = lists;

            CultureManager cm   = new CultureManager();
            culture        info = cm.GetByPK(id);

            return(View(info));
        }
Пример #5
0
 ? Convert(culture, dv)
 : base.ConvertFrom(context, culture, value);
Пример #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ConfirmPrompt"/> class.
 /// </summary>
 /// <param name="culture">Culture to use if <c>DialogContext.Context.Activity.Locale</c> property not specified. Defaults to a value of. <code>CultureInfo.CurrentCulture</code>.</param>
 /// <param name="validator">Validator that will be called each time the user responds to the prompt.  If the validator replies with a message no additional retry prompt will be sent.</param>
 public ConfirmPrompt(string culture, PromptValidator <ConfirmResult> validator = null) => _prompt = new ConfirmPromptInternal(culture, validator);