STAGE3-1
This commit is contained in:
@@ -35,7 +35,7 @@ public partial class admin_stock_new_reg : MyWeb.config
|
||||
else
|
||||
{
|
||||
int _num = Val(Request["num"]);
|
||||
var qry = _db.stocks.AsEnumerable();
|
||||
var qry = _db.stocks.AsQueryable();
|
||||
var prod = qry.Where(q => q.num == _num).FirstOrDefault();
|
||||
if (prod != null)
|
||||
{
|
||||
@@ -315,7 +315,7 @@ public partial class admin_stock_new_reg : MyWeb.config
|
||||
int _type = Val(category.SelectedValue);
|
||||
|
||||
|
||||
var qry = _db.stocks.AsEnumerable();
|
||||
var qry = _db.stocks.AsQueryable();
|
||||
qry = qry.Where(o => o.actItem_num == item_id);
|
||||
qry = qry.Where(o => o.kind == Convert.ToInt32(kind.Value));
|
||||
|
||||
@@ -376,8 +376,7 @@ public partial class admin_stock_new_reg : MyWeb.config
|
||||
protected int getFinalStock(int actItem , int kind,bool rent=false)
|
||||
{
|
||||
int _fq = 0;
|
||||
var qry = _db.stocks.AsEnumerable()
|
||||
.Where(q => q.kind == kind) //同倉庫
|
||||
var qry = _db.stocks.Where(q => q.kind == kind) //同倉庫
|
||||
.Where(q => q.actItem_num == actItem) //同品項
|
||||
.OrderByDescending(q => q.num).FirstOrDefault();
|
||||
if (qry != null)
|
||||
|
||||
Reference in New Issue
Block a user