IDP设计图纸管理
This commit is contained in:
@@ -217,6 +217,7 @@ namespace BLL
|
||||
newItem.FormatFileName = item.formatFileName;
|
||||
newItem.FileVersion = item.fileVersion;
|
||||
newItem.MajorNo = item.majorNo;
|
||||
newItem.MajorName = item.majorName;
|
||||
newItem.Status = item.status;
|
||||
newItem.DesignUserName = item.designUserName;
|
||||
newItem.JiaoheUserName = item.jiaoheUserName;
|
||||
@@ -258,10 +259,6 @@ namespace BLL
|
||||
catch (WebException ex)
|
||||
{
|
||||
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -298,6 +295,7 @@ namespace BLL
|
||||
newItem.FormatFileName = obj.FormatFileName;
|
||||
newItem.FileVersion = obj.FileVersion;
|
||||
newItem.MajorNo = obj.MajorNo;
|
||||
newItem.MajorName = obj.MajorName;
|
||||
newItem.Status = obj.Status;
|
||||
newItem.DesignUserName = obj.DesignUserName;
|
||||
newItem.JiaoheUserName = obj.JiaoheUserName;
|
||||
@@ -320,18 +318,20 @@ namespace BLL
|
||||
/// 接收保存数据
|
||||
/// </summary>
|
||||
/// <param name="newItem"></param>
|
||||
public static string SaveDesignDrawingData(OADesignDrawingData newItems)
|
||||
public static string SaveDesignDrawingData(List<OADesignDrawingDataItem> items)
|
||||
{
|
||||
try
|
||||
{
|
||||
string message = string.Empty;
|
||||
int succ = 0;
|
||||
int err = 0;
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
foreach (var item in newItems.DataItems)
|
||||
foreach (var item in items)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(item.RdpId))
|
||||
if (!string.IsNullOrWhiteSpace(item.RdpId) && !string.IsNullOrWhiteSpace(item.fileid))
|
||||
{
|
||||
IDP_DesignDrawing newItem = db.IDP_DesignDrawing.FirstOrDefault(x => x.StockId == item.RdpId);
|
||||
IDP_DesignDrawing newItem = db.IDP_DesignDrawing.FirstOrDefault(x => x.StockId == item.RdpId && x.ThirdId == item.fileid);
|
||||
if (newItem != null)
|
||||
{
|
||||
newItem.RdpId = item.RdpId;
|
||||
@@ -345,13 +345,19 @@ namespace BLL
|
||||
newItem.Printtime = item.printtime;
|
||||
newItem.Ifmail = item.ifmail;
|
||||
db.SubmitChanges();
|
||||
succ++;
|
||||
}
|
||||
else
|
||||
{
|
||||
err++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
err++;
|
||||
}
|
||||
}
|
||||
message = $"总数{(succ + err)}条;失败{err}条,成功{succ}条!";
|
||||
}
|
||||
return message;
|
||||
}
|
||||
@@ -359,10 +365,6 @@ namespace BLL
|
||||
{
|
||||
return ex.Message;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user