Merge branch 'master' of http://scddns.f3322.net:13000/sc/Audit_APP
This commit is contained in:
commit
ee4118c361
5 files changed
+18
-14
No files matched your search
@@ -8,18 +8,22 @@ using System.Windows.Data;
|
||||
|
||||
namespace Audit.ConvertMoels
|
||||
{
|
||||
/// <summary>
|
||||
/// 零值标红转换器
|
||||
/// DispenseGrams为零的单元格文本标红返回
|
||||
/// </summary>
|
||||
internal class GramsSQLConvert : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
string G = value.ToString();
|
||||
if (G == "0")
|
||||
if (G == "0")//判断单元格值是否为零
|
||||
{
|
||||
return "red";
|
||||
return "red";//零返回红色
|
||||
}
|
||||
else
|
||||
{
|
||||
return "black";
|
||||
return "black";//非零返回黑色
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,15 +25,15 @@ namespace Models
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public List<DyelotsBulkedRecipe> Selectsql(DyelotsBulkedRecipe t)
|
||||
public List<DyelotsBulkedRecipe> Selectsql(DyelotsBulkedRecipe t)//以单号查询
|
||||
{
|
||||
string sqlselect = "select * from DyelotsBulkedRecipe Where Dyelot = "+"'"+ t.Dyelot.ToString()+"'";
|
||||
return db.DyelotsBulkedRecipe.SqlQuery(sqlselect).ToList();//查询前100条
|
||||
return db.DyelotsBulkedRecipe.SqlQuery(sqlselect).ToList();
|
||||
}
|
||||
|
||||
public List<DyelotsBulkedRecipe> Select()
|
||||
public List<DyelotsBulkedRecipe> Select()//查询前300条
|
||||
{
|
||||
return db.DyelotsBulkedRecipe.SqlQuery("select TOP (100) * from DyelotsBulkedRecipe").ToList();//查询前100条
|
||||
return db.DyelotsBulkedRecipe.SqlQuery("select TOP (300) * from DyelotsBulkedRecipe").ToList();//查询前300条
|
||||
}
|
||||
public int Update(DyelotsBulkedRecipe t)
|
||||
{
|
||||
|
||||
@@ -36,20 +36,20 @@ namespace Models
|
||||
return db.Dyelots.SqlQuery(sqlselect).ToList();
|
||||
}
|
||||
|
||||
public List<Dyelots> Selectsql(Dyelots t)
|
||||
public List<Dyelots> Selectsql(Dyelots t)//以单号查询
|
||||
{
|
||||
string sqlselect = "select * from Dyelots Where Dyelot = " + "'" + t.Dyelot.ToString() + "'";
|
||||
return db.Dyelots.SqlQuery(sqlselect).ToList();
|
||||
}
|
||||
|
||||
public List<Dyelots> Selecttime(Dyelots t)
|
||||
public List<Dyelots> Selecttime(Dyelots t)//以时间查询
|
||||
{
|
||||
string sqlselect = "select * from Dyelots Where CreationTime < " + "'" + t.EndTime.ToString()
|
||||
+ "' and CreationTime > '" + t.StartTime.ToString() + "'";
|
||||
return db.Dyelots.SqlQuery(sqlselect).ToList();
|
||||
}
|
||||
|
||||
public List<Dyelots> SelectMachine(Dyelots t)
|
||||
public List<Dyelots> SelectMachine(Dyelots t)//以时间及机台查询
|
||||
{
|
||||
string sqlselect = "select * from Dyelots Where CreationTime < " + "'" + t.EndTime.ToString()
|
||||
+ "' and CreationTime > '" + t.StartTime.ToString() + "' and Machine = '" + t.Machine.ToString() + "'";
|
||||
|
||||
@@ -35,16 +35,16 @@ namespace Models
|
||||
|
||||
public List<Product> Selects0()
|
||||
{
|
||||
return db.Product.SqlQuery("select * from Product where ProductType = 0").ToList();//查询
|
||||
return db.Product.SqlQuery("select * from Product where ProductType = 0").ToList();//类型0查询
|
||||
}
|
||||
|
||||
public List<Product> Selects1()
|
||||
{
|
||||
return db.Product.SqlQuery("select * from Product where ProductType = 1").ToList();//查询
|
||||
return db.Product.SqlQuery("select * from Product where ProductType = 1").ToList();//类型1查询
|
||||
}
|
||||
public List<Product> Selects2()
|
||||
{
|
||||
return db.Product.SqlQuery("select * from Product where ProductType = 2").ToList();//查询
|
||||
return db.Product.SqlQuery("select * from Product where ProductType = 2").ToList();//类型2查询
|
||||
}
|
||||
|
||||
public List<Product> Selectsql(Product t)
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace Audit.View
|
||||
else
|
||||
{
|
||||
DyelotsBulkedRecipe_Button.Dyelot = DataGridDyelots_Button;//传递单号
|
||||
Dyelots_Button.Dyelot = DataGridDyelots_Button;
|
||||
Dyelots_Button.Dyelot = DataGridDyelots_Button;//传递单号
|
||||
sqlButton_Click = 1;//发生按钮状态单号查询
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user