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

📄 checkform.cs

📁 一个较小的采购系统,一些比较实际的代码,可以用来参考
💻 CS
字号:
using System;
using System.Data;
using System.Configuration;
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.SqlClient;
/// <summary>
/// checkform 的摘要说明
/// </summary>
public class checkform
{
    public DataSet selectsend()
    { 
        //查找send表中的定单
        SqlConnection conn = new SqlConnection();
        conn.ConnectionString = ConfigurationManager.AppSettings["ConnectionString"];
         SqlCommand cmd = new SqlCommand("selectsend", conn);
        cmd.CommandType = CommandType.StoredProcedure;
        SqlDataAdapter adpt = new SqlDataAdapter(cmd);
        DataSet ds = new DataSet();
        adpt.Fill(ds, "send");
        return ds;
    }
    public DataSet assemble()
    {
        //绑定数据,进行汇总配送
        SqlConnection conn = new SqlConnection();
        conn.ConnectionString = ConfigurationManager.AppSettings["ConnectionString"];
        SqlCommand cmd = new SqlCommand("assemble", conn);
        cmd.CommandType = CommandType.StoredProcedure;
        SqlDataAdapter adpt = new SqlDataAdapter(cmd);
        DataSet ds = new DataSet();
        adpt.Fill(ds, "data");
        conn.Close();
        conn.Dispose();
        return ds;
    }
    public DataSet buyself()
    {
        SqlConnection conn = new SqlConnection();
        conn.ConnectionString = ConfigurationManager.AppSettings["ConnectionString"];
        SqlCommand cmd = new SqlCommand("buyself", conn);
        cmd.CommandType = CommandType.StoredProcedure;

        DateTime Mydatetime = DateTime.Now;
         SqlParameter paratime = new SqlParameter("@cook_nowdate", SqlDbType.DateTime,8);
        paratime.Value = Mydatetime;
        cmd.Parameters.Add(paratime);
        SqlDataAdapter adpt = new SqlDataAdapter(cmd);
        DataSet ds = new DataSet();
        adpt.Fill(ds, "buyself");
        conn.Close();
        conn.Dispose();
        return ds;
    }
    public DataSet meats()
    {
        SqlConnection conn = new SqlConnection();
        conn.ConnectionString = ConfigurationManager.AppSettings["ConnectionString"];
        SqlCommand cmd = new SqlCommand("meats", conn);
        cmd.CommandType = CommandType.StoredProcedure;

    
        SqlDataAdapter adpt = new SqlDataAdapter(cmd);
        DataSet ds = new DataSet();
        adpt.Fill(ds, "meat");
        conn.Close();
        conn.Dispose();
        return ds;
    }
   
}

⌨️ 快捷键说明

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