This commit is contained in:
李超 2023-09-26 15:40:48 +08:00
parent 9942cdcf6f
commit 5768f1cc2e
5 changed files with 221 additions and 193 deletions

View File

@ -4,6 +4,7 @@
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Net;
public static class CNCECHSSEGetWebService
{
@ -20,8 +21,8 @@
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var responeData = new Model.ResponeData();
try
{
try{
CNCECHSSEService.HSSEServiceClient hsseC = new CNCECHSSEService.HSSEServiceClient();
string thisUnitId = string.Empty;
var thisUnit = CommonService.GetIsThisUnit();

View File

@ -114,7 +114,8 @@
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnView" EnablePostBack="true" runat="server" Text="查看" Icon="Find" OnClick="btnView_Click">
</f:MenuButton>
<f:MenuButton ID="btnEdit" EnablePostBack="true" runat="server" Text="编辑" Icon="Find" OnClick="btnEdit_Click">
</f:MenuButton>
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Hidden="true" Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?"
OnClick="btnMenuDel_Click">
</f:MenuButton>

View File

@ -384,6 +384,16 @@ namespace FineUIPro.Web.HSSE.SitePerson
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DayReportView.aspx?DayReportId={0}&nowData=-1", Grid1.SelectedRowID, "查看 - ")));
}
protected void btnEdit_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DayReportEdit.aspx?DayReportId={0}", Grid1.SelectedRowID, "查看 - ")));
}
public string DayReportId
{

View File

@ -212,6 +212,15 @@ namespace FineUIPro.Web.HSSE.SitePerson
/// </remarks>
protected global::FineUIPro.MenuButton btnView;
/// <summary>
/// btnEdit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnEdit;
/// <summary>
/// btnMenuDel 控件。
/// </summary>

View File

@ -308,6 +308,13 @@ namespace FineUIPro.Web.HSSE.SitePerson
{
ShowNotify("入场时间不能为空!", MessageBoxIcon.Warning);
return;
}
var person = Funs.DB.SitePerson_Person.FirstOrDefault(x => x.IdentityCard == this.txtIdentityCard.Text && x.ProjectId != CurrUser.LoginProjectId && x.IsUsed == 1);
if (person!=null)
{
var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == person.ProjectId);
ShowNotify("未在"+ project .ProjectName+ "中离场,不能入场该项目!", MessageBoxIcon.Warning);
return;
}
SaveData(1);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());