pub.cs

(开头部分) 3KB

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using System.Text.RegularExpressions;
namespace 仓库管理系统
{
    
    public class pub
    {
             SQLHelper db = new SQLHelper();
             public string turn_category(int id)
             {
                 string query = "select * from category where c_id=@id";
                 SqlParameter[] paras = new SqlParameter[] 
               { 
                  new SqlParameter("@id",id), 
               };
                 DataTable dt = db.ExecuteQuery(query, paras, CommandType.Text);
                 return dt.Rows[0]["category"].ToString();
             }
        //
             public DataTable turn_pro(int pro_id)
             {
                 string sql = "select * from product where pro_id="+pro_id;
                 DataTable dt = db.ExecuteQuery(sql, CommandType.Text);
                 return dt;
             }
        //
             public string turn_depot(int depot_id)
             {
                 string cx = "select * from depot where depot_id="+depot_id;
                 DataTable d = db.ExecuteQuery(cx, CommandType.Text);
                 return d.Rows[0]["depot"].ToString();
             }
        //
             public int pro_total(int pro_id,int depot_id)//计算某商品在某仓库的总库存量
             {
                 string sql = "select sum(sl) as a from cg where depot_id="+depot_id+" and pro_id="+pro_id+"";
                 DataTable d = db.ExecuteQuery(sql, CommandType.Text);
                 int cg_sum;
                 if (d.Rows[0]["a"].ToString() == "")
                 {
                     cg_sum = 0;
                 }
                 else
                 {
                     cg_sum = int.Parse(d.Rows[0]["a"].ToString());
                 }
                 //
                 string cx= "select sum(sl) as b from ck where depot_id=" + depot_id + " and pro_id=" + pro_id + "";
                 DataTable dst = db.ExecuteQuery(cx, CommandType.Text);
                 int ck_sum;
                 if (dst.Rows[0]["b"].ToString() == "")
                 {
                     ck_sum=0;
                 }
                 else
后面还有 44 行代码,购买后查看完整代码

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

AI 解读 AI

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

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