public ActionResult DoUpdate(Category category)
 {
     DataOperator dop = new DataOperator(Runtime.SqlConfig);
     dop.Update(category);
     TemplateDataHelper.Categories = null;
     return Redirect("/Admin/Success.do");
 }
 public ActionResult DoUpdate(Article article)
 {
     DataOperator dop = new DataOperator(Runtime.SqlConfig);
     article.ATime = DateTime.Now;
     dop.Update(article);
     return Redirect("/Admin/Success.do");
 }
 public ActionResult DoDelete(Article article)
 {
     article.ACategoryName = "recycle";
     DataOperator dop = new DataOperator(Runtime.SqlConfig);
     dop.Update(article);
     return Redirect("/Admin/Success.do");
 }
        private void btnChongZhi_Click(object sender, EventArgs e)
        {
            DataOperator dop = new DataOperator(UccRuntime.SqlConfig);
            User user = new User();
            user.UserID = this.txtUserID.Text;
            user = dop.SelectSingle(user) as User;

            double shishou = 0;
            if (double.TryParse(this.txtShiShou.Text, out shishou))
                user.Money += shishou;
            double zengsong = 0;
            if (double.TryParse(this.txtZengSong.Text, out zengsong))
                user.Money += zengsong;
            //user.Money = double.Parse(this.txtMoney.Text) + double.Parse(this.txtShiShou.Text) + int.Parse(this.txtZengSong.Text);
            dop.Update(user);

            MoneyHistory history = new MoneyHistory();
            history.UserID = this.txtUserID.Text;
            history.UserName = this.txtUserName.Text;
            history.MoneyID = "M" + DateTime.Now.ToString("yyyyMMdd") + dop.Count<MoneyHistory>();
            history.MoneyTime = DateTime.Now;
            history.ShiShouMoney = shishou;
            history.ZengSongMoney = zengsong;
            dop.Insert(history);
            dop.Commit();

            MessageBox.Show("操作成功!");
        }
 public ActionResult DoUpdate(string Tags)
 {
     DataOperator dop = new DataOperator(Runtime.SqlConfig);
     string[] array = Tags.Split(',');
     List<ArticleTag> list = new List<ArticleTag>();
     foreach(var item in array)
     {
         ArticleTag tag = new ArticleTag();
         tag.TagName = item;
         tag.TagTitle = item;
         if (dop.SelectSingle(tag) == null)
             dop.Update<ArticleTag>(tag);
     }
     return Redirect("/Admin/Success.do");
 }
 public ActionResult DoDelete(string categoryName)
 {
     DataOperator dop = new DataOperator(Runtime.SqlConfig);
     dop.Delete(categoryName);
     Article mArticle = new Article();
     mArticle.ACategoryName = categoryName;
     var list = dop.Select(mArticle, "", "", 10, 0);     //cms系统要改
     foreach(var item in list)
     {
         var article = item as Article;
         article.ACategoryName = "0";
         dop.Update(article);
     }
     TemplateDataHelper.Categories = null;
     return Redirect("/Admin/Success.do");
 }