Exemplo n.º 1
0
 private void ShowInfo(string category)
 {
     UFB.BLL.CategoryManager bll   = new UFB.BLL.CategoryManager();
     UFB.Model.Category      model = bll.GetModel(category);
     this.lblcategory.Text = model.category;
     this.lbltime.Text     = model.time.ToString();
 }
Exemplo n.º 2
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (!PageValidate.IsDateTime(txttime.Text))
            {
                strErr += "time格式错误!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string   category = this.lblcategory.Text;
            DateTime time     = DateTime.Parse(this.txttime.Text);


            UFB.Model.Category model = new UFB.Model.Category();
            model.category = category;
            model.time     = time;

            UFB.BLL.CategoryManager bll = new UFB.BLL.CategoryManager();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx");
        }