|
|
@ -10,7 +10,7 @@ using CK.SCP.Models.ScpEntity; |
|
|
|
using CK.SCP.Utils; |
|
|
|
using CK.SCP.Controller; |
|
|
|
using FineUI; |
|
|
|
|
|
|
|
using CK.SCP.Models; |
|
|
|
|
|
|
|
namespace SCP.Views.PlanData |
|
|
|
{ |
|
|
@ -60,13 +60,31 @@ namespace SCP.Views.PlanData |
|
|
|
var _receive = new V_TB_ARRIVE_DETAIL(); |
|
|
|
_receive.ArrvBillNum = GetQueryValue("ArrvBillNum"); |
|
|
|
_receive.SubSite = GetQueryValue("SubSite"); |
|
|
|
//_receive.Site = CurrentUser.UsedDomain;
|
|
|
|
SCP_RECIVECE_CONTROLLER.Get_V_TB_ARRIVE_DETAIL_List(_receive, (ret) => |
|
|
|
{ |
|
|
|
if (ret.State == ReturnStatus.Succeed) |
|
|
|
{ |
|
|
|
Grid_V_TB_ARRIVE_DETAIL.RecordCount = ret.Result.Count(); |
|
|
|
var _ls = SortAndPage(ret.Result, Grid_V_TB_ARRIVE_DETAIL); |
|
|
|
Grid_V_TB_ARRIVE_DETAIL.DataSource = _ls; |
|
|
|
|
|
|
|
var lst = _ls.ToList(); |
|
|
|
using (ScpEntities db = EntitiesFactory.CreateScpInstance()) |
|
|
|
{ |
|
|
|
foreach (var lt in lst) |
|
|
|
{ |
|
|
|
if (string.IsNullOrEmpty(lt.PartDesc1)) |
|
|
|
{ |
|
|
|
var partModel = db.TA_PART.FirstOrDefault(p => p.PartCode == lt.PartCode && p.Site == lt.Site); |
|
|
|
if (partModel != null) |
|
|
|
{ |
|
|
|
lt.PartDesc1 = partModel.PartDesc1; |
|
|
|
lt.Unit = partModel.Unit; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
Grid_V_TB_ARRIVE_DETAIL.DataSource = lst; |
|
|
|
Grid_V_TB_ARRIVE_DETAIL.DataBind(); |
|
|
|
} |
|
|
|
}); |
|
|
|