旧版报表、仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

35 lines
1.2 KiB

using System.Collections.Generic;
using System.Data.Entity.Validation;
using System.Linq;
using System.Web;
using Warehouse.Models.mesModel;
using Z.EntityFramework.Plus;
using System;
using System.Data;
namespace Warehouse.DAL.WOFinsihStatus
{
public class WOFinsihStatus
{
public List<dynamic> QueryInfo(string wo, string sales, string customer, string bt, string et)
{
using (var context = new mesModel())
{
string sql = @"exec mes_main.dbo.prWOFinishStatus ";
sql += string.IsNullOrEmpty(wo) ? " @wo=N''" : " @wo =N'" + wo + "'";
sql += string.IsNullOrEmpty(sales) ? " ,@sales=N''" : " ,@sales=N'" + sales + "'";
sql += string.IsNullOrEmpty(customer) ? " ,@customer=N''" : " ,@customer=N'" + customer + "'";
if (!string.IsNullOrEmpty(bt) && !string.IsNullOrEmpty(et))
{
sql += " ,@bt=N'" + bt + "',@et=N'" + et + "'";
}
else
{
sql += " ,@bt=N'',@et=N''";
}
var res = context.DynamicListFromSql(sql, null);
return res.ToList();
}
}
}
}