AddClass.aspx.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using MyWeb.DBUtility;
using MyWeb.WebUtility;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace MyWeb
{
    public partial class AddClass : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            DBHelper db = new DBHelper();
            //声明提示类
            WebHelper wb = new WebHelper();
            //非空判断
            if (TextBox1.Text == "")
            {
                wb.Alert("商品种类名称不能为空");
            }
            //else if (TextBox2.Text == "")
            //{
            //    wb.Alert("价格不能为空");
            //}
            //else if (TextBox3.Text == "")
            //{
            //    wb.Alert("可供人数不能为空");
            //}
            //else if (TextBox4.Text == "")
            //{
            //    wb.Alert("餐具数量不能为空");
            //}
            //else if (TextBox5.Text == "")
            //{
            //    wb.Alert("商品数不能为空");
            //}
            //else if (TextBox6.Text == "")
            //{
            //    wb.Alert("商品种类说明不能为空");
            //}
            else
            {
                //设置文件的保存路径
                //string savePath = Server.MapPath("~/HousePic/");
                //string Url = "";
                //string Name = "";
                //判断是否有文件上传
                //if (FileUpload1.HasFile)
                //{
                //判断是否存在这个文件夹
                //if (!System.IO.Directory.Exists(savePath))
                //{
                //如果没有这个文件夹,就创建一个
后面还有 43 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。