checkform.cs
来自「一个较小的采购系统,一些比较实际的代码,可以用来参考」· CS 代码 · 共 77 行
CS
77 行
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 + =
减小字号Ctrl + -
显示快捷键?