/// <summary> /// 更新报文状态(商检审核--更新数据表) /// </summary> /// <param name="resultStatus"></param> /// <returns></returns> public string updateUploadStatus1(model.productCustomsResult resultStatus) { string s = string.Empty; model.pbxdatasourceDataContext context = new model.pbxdatasourceDataContext(); var p = (from c in context.productCustomsResult where c.productScode == resultStatus.productScode select c).SingleOrDefault(); if (p == null) { return("货号为" + resultStatus.productScode + "的商品未生成过报文"); } p.CIQGoodsNO = resultStatus.CIQGoodsNO; p.RegStatus = resultStatus.RegStatus; p.RegNotes = resultStatus.RegNotes; try { context.SubmitChanges(); s = "更新商检成功"; } catch (Exception ex) { s = ex.Message; //s = "更新商检失败"; } return(s); }
/// <summary> /// 上传报文状态(插入数据表) /// </summary> /// <param name="resultStatus"></param> /// <returns></returns> public string addUploadStatus(model.productCustomsResult resultStatus) { string s = string.Empty; model.pbxdatasourceDataContext context = new model.pbxdatasourceDataContext(); try { context.productCustomsResult.InsertOnSubmit(resultStatus); context.SubmitChanges(); s = "添加成功"; } catch { s = "添加失败"; } return(s); }
/// <summary> /// 更新报文状态(商检--更新数据表) /// </summary> /// <param name="resultStatus"></param> /// <returns></returns> public string updateUploadStatus(model.productCustomsResult resultStatus) { string s = string.Empty; model.pbxdatasourceDataContext context = new model.pbxdatasourceDataContext(); var p = (from c in context.productCustomsResult where c.productScode == resultStatus.productScode select c).SingleOrDefault(); //SJOrgReturnTime,SJOrgStatus,SJOrgNotes,SJstatus p.SJOrgReturnTime = resultStatus.SJOrgReturnTime; p.SJOrgStatus = resultStatus.SJOrgStatus; p.SJOrgNotes = resultStatus.SJOrgNotes; p.SJstatus = resultStatus.SJstatus; try { context.SubmitChanges(); s = "更新商检成功"; } catch { s = "更新商检失败"; } return(s); }
/// <summary> /// 更新报文状态(联邦--更新数据表) /// </summary> /// <param name="resultStatus"></param> /// <returns></returns> public string updateUploadStatus2(model.productCustomsResult resultStatus) { string s = string.Empty; model.pbxdatasourceDataContext context = new model.pbxdatasourceDataContext(); var p = (from c in context.productCustomsResult where c.productScode == resultStatus.productScode select c).SingleOrDefault(); p.BBCask = resultStatus.BBCask; p.BBCerrorMessage = resultStatus.BBCerrorMessage; p.BBCmessage = resultStatus.BBCmessage; p.BBCReturnData = resultStatus.BBCReturnData; p.BBCskuNo = resultStatus.BBCskuNo; try { context.SubmitChanges(); s = "更新商检成功"; } catch { s = "更新商检失败"; } return(s); }
/// <summary> /// 上传报文状态(插入数据表) /// </summary> /// <param name="resultStatus"></param> /// <returns></returns> public string addUploadStatus(model.productCustomsResult resultStatus) { return(dal.addUploadStatus(resultStatus)); }
/// <summary> /// 更新报文状态(联邦--更新数据表) /// </summary> /// <param name="resultStatus"></param> /// <returns></returns> public string updateUploadStatus2(model.productCustomsResult resultStatus) { return(dal.updateUploadStatus2(resultStatus)); }