Esempio n. 1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (!PageValidate.IsNumber(txtFolderID.Text))
            {
                strErr += "FolderID格式错误!\\n";
            }
            if (this.txtFoldername.Text.Trim().Length == 0)
            {
                strErr += "Foldername不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            int    FolderID   = int.Parse(this.txtFolderID.Text);
            string Foldername = this.txtFoldername.Text;

            eChartProject.Model.eChart.Server_Contents_Folders model = new eChartProject.Model.eChart.Server_Contents_Folders();
            model.FolderID   = FolderID;
            model.Foldername = Foldername;

            eChartProject.BLL.eChart.Server_Contents_Folders bll = new eChartProject.BLL.eChart.Server_Contents_Folders();
            bll.Add(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx");
        }
Esempio n. 2
0
 private void ShowInfo()
 {
     eChartProject.BLL.eChart.Server_Contents_Folders   bll   = new eChartProject.BLL.eChart.Server_Contents_Folders();
     eChartProject.Model.eChart.Server_Contents_Folders model = bll.GetModel();
     this.txtFolderID.Text   = model.FolderID.ToString();
     this.txtFoldername.Text = model.Foldername;
 }