HSE管理月报放开编辑

This commit is contained in:
2023-11-03 10:19:27 +08:00
parent 48a0808bfb
commit c3481e1314
5 changed files with 39 additions and 1 deletions
@@ -7,6 +7,7 @@ using System.Text;
using BLL;
using AspNet = System.Web.UI.WebControls;
using Newtonsoft.Json.Linq;
using FineUIPro.Web.DataShow;
namespace FineUIPro.Web.HSSE.Manager
{
@@ -97,6 +98,7 @@ namespace FineUIPro.Web.HSSE.Manager
protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
{
int cm = GetCurMonth();
var getProject = ProjectService.GetProjectByProjectId(CurrUser.LoginProjectId);
for (int i = 1; i <= 12; i++)
{
@@ -104,7 +106,7 @@ namespace FineUIPro.Web.HSSE.Manager
if (i != cm)
{
DateTime temp = DateTime.Parse(DateTime.Now.Year + "-" + i + "-10");
if (temp.AddMonths(1) < DateTime.Now)
if (temp.AddMonths(1) < DateTime.Now &&(!getProject.IsHSEReportEditable.HasValue || !getProject.IsHSEReportEditable.Value) )
{
string monthC = "Month" + i.ToString();
RenderField month = Grid1.FindColumn(monthC) as RenderField;
@@ -23,6 +23,8 @@
<f:FormRow runat="server">
<Items>
<f:CheckBox ID="ckbIsFace" runat="server" Label="移动端人脸识别" Text="是否启用" LabelWidth="200">
</f:CheckBox>
<f:CheckBox ID="ckbIsHSEReportEditable" runat="server" Label="HSE管理月报放开编辑" Text="是否启用" LabelWidth="200">
</f:CheckBox>
<f:Label runat="server"></f:Label>
<f:Button runat="server" Text="坐标范围" OnClick="btnSetMap_Click" ID="btnSetMap" Hidden="true" ></f:Button>
@@ -93,6 +93,7 @@ namespace FineUIPro.Web.common.ProjectSet
if (getProject != null)
{
getProject.IsFace = this.ckbIsFace.Checked;
getProject.IsHSEReportEditable = this.ckbIsHSEReportEditable.Checked;
Funs.DB.SubmitChanges();
}
#endregion
@@ -77,6 +77,15 @@ namespace FineUIPro.Web.common.ProjectSet
/// </remarks>
protected global::FineUIPro.CheckBox ckbIsFace;
/// <summary>
/// ckbIsHSEReportEditable 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckbIsHSEReportEditable;
/// <summary>
/// btnSetMap 控件。
/// </summary>