BLL/Stocks.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
namespace BLL
{
/// <summary>
/// 库存
/// </summary>
public class Stocks
{
public string ErrorMessage = "";
/// <summary>
/// 查询库存
/// </summary>
/// <param name="pCount"></param>
/// <param name="rCount"></param>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="sortType"></param>
/// <param name="userID"></param>
/// <param name="where"></param>
/// <returns></returns>
public DataTable GetAll(out int pCount, out int rCount, int pageIndex, int pageSize, int sortType = 2, int userID = 0, string where = " IsDelete = 0")
{
int recorderCountFlag = 0;//CONVERT(VARCHAR(10),InTime,120)
//string fields = "ID 编号,ManufactureName 生产厂家,ProductName 产品名称,DrugName 商品名,DrugStandard 剂型,BoxStandard 装箱数,Outprice 销售单价,BoxNumber 件数,QUantity 数量,TotalMoney 金额,HospitalName 医院,SubShopName 分销商";
//string[] arr = { "ID", "InstoreNumber", "InTime", "ProductName", "DrugStandard", "ManufactureName", "BoxStandard", "InPrice", "BoxNumber", "TotalMoney", "StoreName", "ApproveStateName", "LockFLag" };
string fields = "DrugsID,ProductName,DrugName,DrugStandard,DrugType,BoxStandard,ManufactureName,StoreName,StoreNumber";
DataTable table = new DataTable();
try
{
DAL.ExecuteProcedure exec = new DAL.ExecuteProcedure();
SqlParameter[] parameters = { new SqlParameter("@TableName", "View_Stocks")
, new SqlParameter("@FieldList", fields)
, new SqlParameter("@PrimaryKey", "DrugsID")
, new SqlParameter("@Where",where)
, new SqlParameter("@Order","DrugsID desc")
, new SqlParameter("@SortType",sortType)
, new SqlParameter("@RecorderCount",recorderCountFlag)
, new SqlParameter("@PageSize",pageSize)
, new SqlParameter("@PageIndex",pageIndex)
, new SqlParameter("@TotalCount",SqlDbType.Int,32)
, new SqlParameter("@TotalPageCount",SqlDbType.Int,32)
};
parameters[9].Direction = ParameterDirection.Output;
parameters[10].Direction = ParameterDirection.Output;
int flag = exec.run(table, "Pr_ViewPager", parameters);
if (flag == 1)
{
rCount = Convert.ToInt32(parameters[9].Value);
pCount = Convert.ToInt32(parameters[10].Value);
//for (int i = 0; i < arr.Length; i++)
//{
// table.Columns[i].Caption = arr[i];
//}
后面还有 41 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
