webservice 调用修改

This commit is contained in:
2023-07-13 10:09:46 +08:00
parent 4449a7754f
commit e4b7694e42
22 changed files with 4510 additions and 8373 deletions
@@ -88,7 +88,7 @@
<f:FormRow MarginTop="10px">
<Items>
<f:DropDownList runat="server" Width="300px" Label="专业工程师确认" LabelWidth="130px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--">
<f:DropDownList runat="server" Width="300px" Label="质量经理确认" LabelWidth="130px" ID="drpAudit" ShowRedStar="true" Required="true" EmptyText="--请选择--">
</f:DropDownList>
</Items>
</f:FormRow>
@@ -159,7 +159,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
/// <summary>
/// 加载专业工程师
/// 加载质量经理
/// </summary>
public void LoadAuditSelect()
{
@@ -171,7 +171,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
join p in db.Project_ProjectUser
on x.UserId equals p.UserId
where y.UnitId == Const.UnitId_CD && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId
where p.RoleId.Contains(Const.ZBCNEngineer)
where p.RoleId.Contains(Const.QAManager)
select new { UserId = x.UserId, UserName = x.UserName };
drpAudit.DataValueField = "UserId";
drpAudit.DataTextField = "UserName";
File diff suppressed because it is too large Load Diff
@@ -48,14 +48,16 @@
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<f:FormRow ColumnWidths="33.33% 28.33% 5% 33.33%">
<Items>
<f:DropDownList ID="drpIsPost" runat="server" Label="在岗" EnableEdit="true" ForceSelection="false"
Required="true" ShowRedStar="true" LabelWidth="90px">
</f:DropDownList>
<f:Image ID="Image2" ImageUrl="~/res/images/Signature0.png" runat="server" Height="35px" Width="90px"
BoxFlex="1" Label="签名" LabelWidth="90px">
</f:Image>
</f:Image>
<f:Label Text="(360*150)" />
<f:FileUpload runat="server" ID="fileSignature" EmptyText="请选择"
OnFileSelected="btnSignature_Click" AutoPostBack="true" Width="150px" LabelWidth="90px">
</f:FileUpload>
@@ -285,32 +285,29 @@ namespace FineUIPro.Web.ZHGL.ServerCheck
private void UpSubUnitReport(string SubUnitReportId)
{
///创建客户端服务
//var poxy = Web.ServiceProxy.CreateServiceClient();
//poxy.DataInsertSupervise_SubUnitReportItemItemTableCompleted += new EventHandler<HSSEService.DataInsertSupervise_SubUnitReportItemItemTableCompletedEventArgs>(poxy_DataInsertSupervise_SubUnitReportTableCompleted);
//var subUnitReport = from x in Funs.DB.View_Supervise_SubUnitReportItem
// // join y in Funs.DB.AttachFile on x.SubUnitReportItemId equals y.ToKeyId
// where x.SubUnitReportId == SubUnitReportId && (x.UpState == BLL.Const.UpState_2 || x.UpState == BLL.Const.UpState_4 || x.UpState == null)
// select new HSSEService.Supervise_SubUnitReportItem
// {
// SubUnitReportItemId = x.SubUnitReportItemId,
// ReportTitle = x.ReportTitle,
// ReportContent = x.ReportContent,
// // AttachUrl = x.AttachUrl,
// ReportDate = x.ReportDate,
// State = x.State,
// ////附件转为字节传送
// //FileContext = FileStructService.GetFileStructByAttachUrl(x.AttachUrl),
// AttachFileId = x.AttachFileId,
// ToKeyId = x.ToKeyId,
// AttachSource = x.AttachSource,
// AttachUrl = x.AttachUrl,
// ////附件转为字节传送
// FileContext = FileStructService.GetMoreFileStructByAttachUrl(x.AttachUrl),
// };
//poxy.DataInsertSupervise_SubUnitReportItemItemTableAsync(subUnitReport.ToList());
}
if (!string.IsNullOrEmpty(this.trSubUnitReport.SelectedNodeID))
{
SaveData(BLL.Const.UpState_2);
string code = CNCECHSSEGetWebService.UpSupervise_SubUnitReportItem(this.SubUnitReportId, this.CurrUser);
if (code == "1")
{
ShowNotify("同步成功!", MessageBoxIcon.Success);
this.InitTreeMenu();
this.EmptyText();
}
else
{
Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error);
}
this.InitTreeMenu();
this.EmptyText();
}
else
{
ShowNotify("请选择上报名称!", MessageBoxIcon.Warning);
return;
}
}
/// <summary>
/// 企业安全文件上报到集团公司
+17 -17
View File
@@ -10,24 +10,24 @@
public static class ServiceProxy
{
///// <summary>
///// 创建客户端服务
///// </summary>
//public static HSSEService.HSSEServiceClient CreateServiceClient()
//{
// string address = ConfigurationManager.AppSettings["endpoint"];
// var proxy = new HSSEService.HSSEServiceClient();
// ConfigEndpointAddress<HSSEService.HSSEService>(proxy, address);
// return proxy;
//}
///// <summary>
///// 创建客户端服务
///// </summary>
public static BLL.CNCECHSSEService.HSSEServiceClient CreateServiceClient()
{
string address = ConfigurationManager.AppSettings["endpoint"];
var proxy = new BLL.CNCECHSSEService.HSSEServiceClient();
ConfigEndpointAddress<BLL.CNCECHSSEService.HSSEService>(proxy, address);
return proxy;
}
/// <summary>
/// 根据web.config中服务器端主机地址配置服务通道的终端地址。
/// </summary>
/// <typeparam name="TChannel">通道类型</typeparam>
/// <param name="proxy">代理</param>
/// <param name="endpointAddress">服务访问地址</param>
public static void ConfigEndpointAddress<TChannel>(System.ServiceModel.ClientBase<TChannel> proxy, string endpointAddress)
/// <summary>
/// 根据web.config中服务器端主机地址配置服务通道的终端地址。
/// </summary>
/// <typeparam name="TChannel">通道类型</typeparam>
/// <param name="proxy">代理</param>
/// <param name="endpointAddress">服务访问地址</param>
public static void ConfigEndpointAddress<TChannel>(System.ServiceModel.ClientBase<TChannel> proxy, string endpointAddress)
where TChannel : class
{
Uri endpointUri = new Uri(endpointAddress);