Web/cheliangAdd.aspx.cs

(开头部分) 3KB

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

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace Maticsoft.Web
{
    public partial class cheliangAdd : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

                BLL.zhuhuxinxi type = new Maticsoft.BLL.zhuhuxinxi();

                DataSet ds1 = type.GetList("");
                this.DropDownList1.DataTextField = "bianhao";
                this.DropDownList1.DataValueField = "ID";
                this.DropDownList1.DataSource = ds1.Tables[0];
                this.DropDownList1.DataBind();

                BLL.cheweixinxi danwei = new Maticsoft.BLL.cheweixinxi();

                DataSet ds2 = danwei.GetList(" Flag='空'");
                this.DropDownList2.DataTextField = "chewei";
                this.DropDownList2.DataValueField = "ID";
                this.DropDownList2.DataSource = ds2.Tables[0];
                this.DropDownList2.DataBind();

            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Model.cheliangxinxi model = new Maticsoft.Model.cheliangxinxi();
            model.chepai = this.TextBox0.Text.ToString();
            model.chexing = this.TextBox1.Text.ToString();
            model.yanse = this.TextBox2.Text;
            model.huzhu = this.DropDownList1.SelectedItem.Text;
            model.xingming = this.TextBox3.Text.ToString();
            model.chewei = this.DropDownList2.SelectedItem.Text;
            model.beizhu = this.TextBox4.Text.ToString();

            Model.cheweixinxi model1 = new Maticsoft.Model.cheweixinxi();
            BLL.cheweixinxi bll1 = new Maticsoft.BLL.cheweixinxi();
            model1.ID= int.Parse(this.DropDownList2.SelectedItem.Value);
            model1.chewei = this.DropDownList2.SelectedItem.Text;
            model1.Flag = "有";
            BLL.cheliangxinxi bll = new Maticsoft.BLL.cheliangxinxi();

            DataSet ds = bll.GetList(" chepai='" + this.TextBox0.Text.ToString() + "'");
            if (ds.Tables[0].Rows.Count > 0)
            {
                Response.Write("<script>javascript:alert('这个车牌号已经添加,不能重复添加');</script>");
                return;
            }
            int n = bll.Add(model);
后面还有 19 行代码,购买后查看完整代码

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

AI 解读 AI

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

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