Browse Source

修改admin账户查看时间 以及上传文件清空

master
qian 10 months ago
parent
commit
306769108e
  1. 10
      北京北汽/SCP/Views/PlanData/SCP_PO_CQ.aspx.cs
  2. 8
      北京北汽/SCP/Views/PlanData/SCP_TB_ASK_DETAIL_PO.aspx.cs

10
北京北汽/SCP/Views/PlanData/SCP_PO_CQ.aspx.cs

@ -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;
} }
} }

8
北京北汽/SCP/Views/PlanData/SCP_TB_ASK_DETAIL_PO.aspx.cs

@ -65,11 +65,13 @@ namespace SCP.PlanData
_entity.UserInAddress = CurrentUser.FactoryList; _entity.UserInAddress = CurrentUser.FactoryList;
if (CurrentUser.VenderList != null && CurrentUser.VenderList.Count > 0) if (CurrentUser.VenderList != null && CurrentUser.VenderList.Count > 0)
{ {
if (User.Identity.Name == "admin") if (User.Identity.Name.Contains( "admin"))
{ {
_entity.TimeBegin = DateTime.Now.AddMonths(-3);
_entity.TimeEnd = DateTime.Now;
if (_entity.TimeBegin <= (DateTime.Now.AddMonths(-3)))
{
_entity.TimeBegin = DateTime.Now.AddMonths(-3);
}
} }
_entity.UserName = User.Identity.Name; _entity.UserName = User.Identity.Name;
} }

Loading…
Cancel
Save