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

            if (this.txtfilec_name.Text.Trim().Length == 0)
            {
                strErr += "filec_name不能为空!\\n";
            }
            if (this.txtfilec_path.Text.Trim().Length == 0)
            {
                strErr += "filec_path不能为空!\\n";
            }
            if (this.txtfile_ext.Text.Trim().Length == 0)
            {
                strErr += "file_ext不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string filec_name = this.txtfilec_name.Text;
            string filec_path = this.txtfilec_path.Text;
            string file_ext   = this.txtfile_ext.Text;

            WalleProject.Model.t_filecategory model = new WalleProject.Model.t_filecategory();
            model.filec_name = filec_name;
            model.filec_path = filec_path;
            model.file_ext   = file_ext;

            WalleProject.BLL.t_filecategory bll = new WalleProject.BLL.t_filecategory();
            bll.Add(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx");
        }
Ejemplo n.º 2
0
 private void ShowInfo(int filec_ID)
 {
     WalleProject.BLL.t_filecategory   bll   = new WalleProject.BLL.t_filecategory();
     WalleProject.Model.t_filecategory model = bll.GetModel(filec_ID);
     this.lblfilec_ID.Text   = model.filec_ID.ToString();
     this.lblfilec_name.Text = model.filec_name;
     this.lblfilec_path.Text = model.filec_path;
     this.lblfile_ext.Text   = model.file_ext;
 }
Ejemplo n.º 3
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtfilec_name.Text.Trim().Length == 0)
            {
                strErr += "文件名不能为空!\\n";
            }
            if (this.txtfilec_path.Text.Trim().Length == 0)
            {
                strErr += "文件类型不能为空!\\n";
            }
            if (this.txtfile_ext.Text.Trim().Length == 0)
            {
                strErr += "文件后缀不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            int    filec_ID   = int.Parse(this.lblfilec_ID.Text);
            string filec_name = this.txtfilec_name.Text;
            string filec_path = this.txtfilec_path.Text;
            string file_ext   = this.txtfile_ext.Text;


            WalleProject.Model.t_filecategory model = new WalleProject.Model.t_filecategory();
            model.filec_ID   = filec_ID;
            model.filec_name = filec_name;
            model.filec_path = filec_path;
            model.file_ext   = file_ext;

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