|
@ -195,6 +195,7 @@ namespace SCP.Views.PlanData |
|
|
if (string.IsNullOrEmpty(_fileName)) |
|
|
if (string.IsNullOrEmpty(_fileName)) |
|
|
{ |
|
|
{ |
|
|
Alert.Show("选择文件为空!"); |
|
|
Alert.Show("选择文件为空!"); |
|
|
|
|
|
FileUp.Reset(); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
string _lx = _fileName.Split('.')[1]; |
|
|
string _lx = _fileName.Split('.')[1]; |
|
@ -214,6 +215,7 @@ namespace SCP.Views.PlanData |
|
|
if (partCodeList.Count == 0) |
|
|
if (partCodeList.Count == 0) |
|
|
{ |
|
|
{ |
|
|
Alert.Show("未填写零件编码!"); |
|
|
Alert.Show("未填写零件编码!"); |
|
|
|
|
|
FileUp.Reset(); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
List<string> list1 = new List<string>(); |
|
|
List<string> list1 = new List<string>(); |
|
@ -221,12 +223,14 @@ namespace SCP.Views.PlanData |
|
|
if (list1.Count()>0) |
|
|
if (list1.Count()>0) |
|
|
{ |
|
|
{ |
|
|
Alert.Show(string.Format("导入文件中有不存在的零件,如{0}", list1.FirstOrDefault())); |
|
|
Alert.Show(string.Format("导入文件中有不存在的零件,如{0}", list1.FirstOrDefault())); |
|
|
|
|
|
FileUp.Reset(); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
var checkret = SCP_PO_CONTROLLER.Check_EXCEL_PO_MOD_CQ(list, p_modtype, CurrentUser.FactoryList[0], CurrentUser.SubSiteList[0]); |
|
|
var checkret = SCP_PO_CONTROLLER.Check_EXCEL_PO_MOD_CQ(list, p_modtype, CurrentUser.FactoryList[0], CurrentUser.SubSiteList[0]); |
|
|
if (checkret.State == ReturnStatus.Failed && checkret.Result == false) |
|
|
if (checkret.State == ReturnStatus.Failed && checkret.Result == false) |
|
|
{ |
|
|
{ |
|
|
Alert.Show(string.Join("<br>", checkret.MessageList)); |
|
|
Alert.Show(string.Join("<br>", checkret.MessageList)); |
|
|
|
|
|
FileUp.Reset(); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if (CurrentUser.ConfigList.ContainsKey("数据中心接口")) |
|
|
if (CurrentUser.ConfigList.ContainsKey("数据中心接口")) |
|
@ -250,6 +254,7 @@ namespace SCP.Views.PlanData |
|
|
if (saveret.State == ReturnStatus.Succeed && saveret.Result == true) |
|
|
if (saveret.State == ReturnStatus.Succeed && saveret.Result == true) |
|
|
{ |
|
|
{ |
|
|
BindOrder(); |
|
|
BindOrder(); |
|
|
|
|
|
FileUp.Reset(); |
|
|
Alert.Show("订单编号" + saveret.Message + "导入成功!"); |
|
|
Alert.Show("订单编号" + saveret.Message + "导入成功!"); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
@ -257,6 +262,7 @@ namespace SCP.Views.PlanData |
|
|
{ |
|
|
{ |
|
|
//Alert.Show(string.Join("<br>", saveret.MessageList));
|
|
|
//Alert.Show(string.Join("<br>", saveret.MessageList));
|
|
|
Alert.Show(saveret.Message); |
|
|
Alert.Show(saveret.Message); |
|
|
|
|
|
FileUp.Reset(); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -268,6 +274,7 @@ namespace SCP.Views.PlanData |
|
|
if (string.IsNullOrEmpty(_fileName)) |
|
|
if (string.IsNullOrEmpty(_fileName)) |
|
|
{ |
|
|
{ |
|
|
Alert.Show("选择文件为空!"); |
|
|
Alert.Show("选择文件为空!"); |
|
|
|
|
|
FileUp.Reset(); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
string _lx = _fileName.Split('.')[1]; |
|
|
string _lx = _fileName.Split('.')[1]; |
|
@ -287,6 +294,7 @@ namespace SCP.Views.PlanData |
|
|
if (checkret.State == ReturnStatus.Failed && checkret.Result == false) |
|
|
if (checkret.State == ReturnStatus.Failed && checkret.Result == false) |
|
|
{ |
|
|
{ |
|
|
Alert.Show(string.Join("<br>", checkret.MessageList)); |
|
|
Alert.Show(string.Join("<br>", checkret.MessageList)); |
|
|
|
|
|
FileUp.Reset(); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if (CurrentUser.ConfigList.ContainsKey("数据中心接口")) |
|
|
if (CurrentUser.ConfigList.ContainsKey("数据中心接口")) |
|
@ -310,6 +318,7 @@ namespace SCP.Views.PlanData |
|
|
if (saveret.State == ReturnStatus.Succeed && saveret.Result == true) |
|
|
if (saveret.State == ReturnStatus.Succeed && saveret.Result == true) |
|
|
{ |
|
|
{ |
|
|
BindOrder(); |
|
|
BindOrder(); |
|
|
|
|
|
FileUp.Reset(); |
|
|
Alert.Show("订单编号" + saveret.Message + "导入成功!"); |
|
|
Alert.Show("订单编号" + saveret.Message + "导入成功!"); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
@ -317,6 +326,7 @@ namespace SCP.Views.PlanData |
|
|
{ |
|
|
{ |
|
|
//Alert.Show(string.Join("<br>", saveret.MessageList));
|
|
|
//Alert.Show(string.Join("<br>", saveret.MessageList));
|
|
|
Alert.Show(saveret.Message); |
|
|
Alert.Show(saveret.Message); |
|
|
|
|
|
FileUp.Reset(); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|