增加数据穿透界面

This commit is contained in:
2023-06-07 18:55:33 +08:00
parent e66750312e
commit b592ccfe5e
358 changed files with 30974 additions and 2388 deletions
@@ -46,12 +46,15 @@ namespace FineUIPro.Web.ZHGL.Supervise
btnClose.OnClientClick = ActiveWindow.GetHideReference();
superviseCheckReportItems.Clear();
////权限按钮方法
this.GetButtonPower();
if (Request.Params["type"] != "-1")
{
////权限按钮方法
this.GetButtonPower();
}
BLL.ProjectService.InitProjectDropDownList(this.ddlProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.ddlUnitId, this.ddlProjectId.SelectedValue, true);
Funs.FineUIPleaseSelect(this.drpCheckType);
this.SuperviseCheckReportId = Request.Params["SuperviseCheckReportId"];
var superviseCheckReport = BLL.SuperviseCheckReportService.GetSuperviseCheckReportById(this.SuperviseCheckReportId);
if (superviseCheckReport != null)
@@ -61,6 +64,10 @@ namespace FineUIPro.Web.ZHGL.Supervise
{
this.dpkCheckDate.Text = string.Format("{0:yyyy-MM-dd}", superviseCheckReport.CheckDate);
}
if (!string.IsNullOrEmpty(superviseCheckReport.CheckType))
{
this.drpCheckType.SelectedValue = superviseCheckReport.CheckType;
}
if (!string.IsNullOrEmpty(superviseCheckReport.ProjectId))
{
this.ddlProjectId.SelectedValue = superviseCheckReport.ProjectId;
@@ -73,19 +80,14 @@ namespace FineUIPro.Web.ZHGL.Supervise
}
}
this.txtCheckTeam.Text = superviseCheckReport.CheckTeam;
superviseCheckReportItems = (from x in Funs.DB.View_Supervise_SuperviseCheckReportItem
where x.SuperviseCheckReportId == this.SuperviseCheckReportId
orderby x.RectifyCode select x).ToList();
superviseCheckReportItems = (from x in Funs.DB.View_Supervise_SuperviseCheckReportItem where x.SuperviseCheckReportId == this.SuperviseCheckReportId orderby x.RectifyCode select x).ToList();
var report = BLL.SuperviseCheckReportService.GetSuperviseCheckReportById(this.SuperviseCheckReportId);
if (report != null && report.IsIssued == "1") //已下发
{
this.btnSave.Hidden = true;
this.btnSelect.Hidden = true;
this.ddlProjectId.Readonly = true;
this.ddlUnitId.Readonly = true;
Grid1.Columns[6].Enabled = false;
Grid1.Columns[10].Hidden = true;
}
}
@@ -96,6 +98,24 @@ namespace FineUIPro.Web.ZHGL.Supervise
}
Grid1.DataSource = superviseCheckReportItems;
Grid1.DataBind();
GetCheckItem();
}
}
private void GetCheckItem()
{
for (int i = 0; i < Grid1.Rows.Count; i++)
{
var item = superviseCheckReportItems.FirstOrDefault(x => x.SuperviseCheckReportItemId == Grid1.Rows[i].Values[7].ToString());
if (item != null)
{
CheckBoxField checkField = (CheckBoxField)Grid1.FindColumn("ckbIsSelected");
if (item.IsSelected == true)
{
//Grid1.Rows[i].Values[6] = "True";
checkField.SetCheckedState(i, true);
}
}
}
}
#endregion
@@ -109,7 +129,7 @@ namespace FineUIPro.Web.ZHGL.Supervise
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
{
string rowID = Grid1.DataKeys[e.RowIndex][0].ToString();
if (e.CommandName == "IsSelected" && !this.btnSave.Hidden)
if (e.CommandName == "IsSelected")
{
CheckBoxField checkField = (CheckBoxField)Grid1.FindColumn("ckbIsSelected");
if (checkField.GetCheckedState(e.RowIndex))
@@ -134,7 +154,7 @@ namespace FineUIPro.Web.ZHGL.Supervise
superviseCheckReportItems = (from x in superviseCheckReportItems where x.SuperviseCheckReportItemId != rowID select x).ToList();
Grid1.DataSource = superviseCheckReportItems;
Grid1.DataBind();
//GetCheckItem();
GetCheckItem();
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
}
@@ -247,6 +267,11 @@ namespace FineUIPro.Web.ZHGL.Supervise
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (this.drpCheckType.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("检查类别不能为空!", MessageBoxIcon.Warning);
return;
}
Model.Supervise_SuperviseCheckReport superviseCheckReport = new Model.Supervise_SuperviseCheckReport
{
SuperviseCheckReportCode = this.txtSuperviseCheckReportCode.Text.Trim()
@@ -255,6 +280,10 @@ namespace FineUIPro.Web.ZHGL.Supervise
{
superviseCheckReport.CheckDate = Convert.ToDateTime(this.dpkCheckDate.Text.Trim());
}
if (this.drpCheckType.SelectedValue != BLL.Const._Null)
{
superviseCheckReport.CheckType = this.drpCheckType.SelectedValue;
}
if (this.ddlProjectId.SelectedValue != BLL.Const._Null)
{
superviseCheckReport.ProjectId = this.ddlProjectId.SelectedValue;
@@ -318,7 +347,7 @@ namespace FineUIPro.Web.ZHGL.Supervise
}
Grid1.DataSource = superviseCheckReportItems;
Grid1.DataBind();
//GetCheckItem();
GetCheckItem();
hdId.Text = string.Empty;
hdAttachUrl.Text = string.Empty;
}