diff --git a/Controller/SCP_ASK_CONTROLLER.cs b/Controller/SCP_ASK_CONTROLLER.cs index 8b34cda..de89ec5 100644 --- a/Controller/SCP_ASK_CONTROLLER.cs +++ b/Controller/SCP_ASK_CONTROLLER.cs @@ -1223,6 +1223,7 @@ namespace CK.SCP.Controller _t.CreateTime = DateTime.Now; _t.CreateUser = p_buyer; _t.Site = p_ask.Site; + _t.SubSite = p_ask.SubSite; _t.Remark = p_ask.Remark; _t.State = (int)AsnState.New; _t.Remark = p_ask.Remark; @@ -1266,6 +1267,8 @@ namespace CK.SCP.Controller _tDetail.UpdateInfo = itm.UpdateInfo; _tDetail.ReceivedPort = itm.ReceivedPort; _tDetail.GUID = Guid.NewGuid(); + _tDetail.SubSite = itm.SubSite; + _tDetail.Site = itm.Site; db.TB_ASN_DETAIL.Add(_tDetail); var _order_detail = db.TB_ASK_DETAIL.Where(p => p.UID == itm.UID).FirstOrDefault(); _order_detail.ShippedQty = (decimal)itm.ShippedQty; diff --git a/Models/ScpEntity/TB_ASN_DETAIL.cs b/Models/ScpEntity/TB_ASN_DETAIL.cs index c541e00..4b9ed93 100644 --- a/Models/ScpEntity/TB_ASN_DETAIL.cs +++ b/Models/ScpEntity/TB_ASN_DETAIL.cs @@ -56,5 +56,6 @@ namespace CK.SCP.Models.ScpEntity public string Extend2 { get; set; } public string Extend3 { get; set; } public string SubSite { get; set; } + public string Site { get; set; } } } diff --git a/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.cs b/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.cs index c504439..f050447 100644 --- a/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.cs +++ b/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.cs @@ -214,6 +214,7 @@ namespace SCP.PlanData _entity.BuyerPhone = rowDataKeys[32] as string; _entity.VendName = rowDataKeys[33] as string; _entity.PartDesc2 = rowDataKeys[34] as string; + _entity.SubSite = rowDataKeys[38] as string; _entity.TempQty = ConvertHelper.To(rowDataKeys[35]); _entity.BeginTime = DP_BeginTime.SelectedDate; @@ -229,27 +230,6 @@ namespace SCP.PlanData { var modifyValue = modifiedDict[i]; - if (modifyValue.Keys.Contains("SubSite")) - { - _entity.SubSite = modifyValue["SubSite"].ToString(); - } - - - if (modifyValue.Keys.Contains("Extend1")) - { - _entity.Extend1 = modifyValue["Extend1"].ToString(); - } - - if (modifyValue.Keys.Contains("Extend2")) - { - _entity.Extend2 = modifyValue["Extend2"].ToString(); - } - - if (modifyValue.Keys.Contains("Extend3")) - { - _entity.Extend3 = modifyValue["Extend3"].ToString(); - } - if (modifyValue.Keys.Contains("PublishQty")) { var _publishQty = modifyValue["PublishQty"]; diff --git a/SCP/Views/SupplierData/SCP_ASN_CREATE.aspx.cs b/SCP/Views/SupplierData/SCP_ASN_CREATE.aspx.cs index 243e217..593b3fe 100644 --- a/SCP/Views/SupplierData/SCP_ASN_CREATE.aspx.cs +++ b/SCP/Views/SupplierData/SCP_ASN_CREATE.aspx.cs @@ -217,7 +217,8 @@ namespace SCP.SupplierData _entity.PartDesc1 = rowDataKeys[23] as string; _entity.CurrencyDesc = rowDataKeys[24] as string; _entity.Site = rowDataKeys[25] as string; - _entity.VendName = rowDataKeys[26] as string; + _entity.SubSite = rowDataKeys[36] as string; + _entity.VendName = rowDataKeys[26] as string; _entity.PartDesc2 = rowDataKeys[27] as string; _entity.AskBillNum = rowDataKeys[28] as string; _entity.AskQty = ConvertHelper.To(rowDataKeys[29]); @@ -240,26 +241,6 @@ namespace SCP.SupplierData var _Batch1 = modifyValue.Keys.Contains("Batch") ? modifyValue["Batch"] : _entity.Batch; var _VendBatch = modifyValue.Keys.Contains("VendBatch") ? modifyValue["VendBatch"].ToString() : _entity.Batch; var _ProduceDate = modifyValue.Keys.Contains("ProduceDate") ? modifyValue["ProduceDate"].ToString() : _entity.ProduceDate.ToString(); - if (modifyValue.Keys.Contains("SubSite")) - { - _entity.SubSite = modifyValue["SubSite"].ToString(); - } - - - if (modifyValue.Keys.Contains("Extend1")) - { - _entity.Extend1 = modifyValue["Extend1"].ToString(); - } - - if (modifyValue.Keys.Contains("Extend2")) - { - _entity.Extend2 = modifyValue["Extend2"].ToString(); - } - - if (modifyValue.Keys.Contains("Extend3")) - { - _entity.Extend3 = modifyValue["Extend3"].ToString(); - } if (string.IsNullOrEmpty(_VendBatch) || string.IsNullOrEmpty(_ProduceDate)) { diff --git a/SCP/default.aspx b/SCP/default.aspx index beef335..4f94e56 100644 --- a/SCP/default.aspx +++ b/SCP/default.aspx @@ -111,10 +111,10 @@ for (var i = 0; obj.options.length; i++) { - if ('JZ1' == obj.options[i].value) { + if ('2000' == obj.options[i].value) { obj.options[i].selected = true; _factory = document.getElementById(_factoryValue); - _factory.value = 'JZ1'; + _factory.value = '2000'; } } }