⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ccgc.aspx.cs

📁 互联网程序设计的课程
💻 CS
字号:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.Sql;
using System.Data.SqlClient;
using System.Web.SessionState;

public partial class fee_ccgc : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    { 
SqlConnection dbcon=new SqlConnection("server=ck;uid=sa;pwd=sa;database=91");
dbcon.Open();
        SqlCommand  comm=new SqlCommand ("YeWY_code1",dbcon);
        comm.CommandType =CommandType .StoredProcedure ;
        
        comm.Parameters.Add(new SqlParameter("@DATE1", SqlDbType.DateTime));
        comm.Parameters["@DATE1"].Value = DateTime.Now.Date;
        comm.Parameters.Add(new SqlParameter("@COUNT", SqlDbType.VarChar, 15));
        comm.Parameters["@COUNT"].Direction = ParameterDirection.Output;
        comm.ExecuteNonQuery();
        this.TextBox1.Text = "YWY"+(long.Parse((comm.Parameters["@COUNT"].Value.ToString()).Trim()) + 1).ToString();
        //同时插入客户编号为TextBox1.Text,登记时间为Now.Date的记录到客户表;


 dbcon.Close();


    }

    private int Left(string p, int p_2)
    {
        throw new Exception("The method or operation is not implemented.");
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -