fix:升级

This commit is contained in:
geh
2025-06-19 19:23:01 +08:00
parent 0cb37e2c02
commit 7aa8baadbb
111 changed files with 14465 additions and 1480 deletions
@@ -54,7 +54,9 @@ namespace FineUIPro.Web.ZHGL.Supervise
BLL.ProjectService.InitProjectDropDownList(this.ddlProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.ddlUnitId, this.ddlProjectId.SelectedValue, true);
Funs.FineUIPleaseSelect(this.drpCheckType);
BLL.UnitService.InitBranchUnitDropDownList(this.ddlCheckUnitId, false);
Funs.FineUIPleaseSelect(this.drpCheckMainType);
//Funs.FineUIPleaseSelect(this.drpCheckType);
this.SuperviseCheckReportId = Request.Params["SuperviseCheckReportId"];
var superviseCheckReport = BLL.SuperviseCheckReportService.GetSuperviseCheckReportById(this.SuperviseCheckReportId);
if (superviseCheckReport != null)
@@ -64,21 +66,30 @@ namespace FineUIPro.Web.ZHGL.Supervise
{
this.dpkCheckDate.Text = string.Format("{0:yyyy-MM-dd}", superviseCheckReport.CheckDate);
}
if (!string.IsNullOrEmpty(superviseCheckReport.CheckType))
if (!string.IsNullOrWhiteSpace(superviseCheckReport.CheckMainType))
{
this.drpCheckMainType.SelectedValue = superviseCheckReport.CheckMainType;
BLL.SuperviseCheckTypeService.InitCheckTypeDropDownListByMainType(this.drpCheckType, superviseCheckReport.CheckMainType, false);
}
if (!string.IsNullOrWhiteSpace(superviseCheckReport.CheckType))
{
this.drpCheckType.SelectedValue = superviseCheckReport.CheckType;
}
if (!string.IsNullOrEmpty(superviseCheckReport.ProjectId))
if (!string.IsNullOrWhiteSpace(superviseCheckReport.ProjectId))
{
this.ddlProjectId.SelectedValue = superviseCheckReport.ProjectId;
this.ddlUnitId.Items.Clear();
BLL.UnitService.InitUnitDropDownList(this.ddlUnitId, this.ddlProjectId.SelectedValue, true);
if (!string.IsNullOrEmpty(superviseCheckReport.UnitId))
if (!string.IsNullOrWhiteSpace(superviseCheckReport.UnitId))
{
this.ddlUnitId.SelectedValue = superviseCheckReport.UnitId;
}
}
if (!string.IsNullOrWhiteSpace(superviseCheckReport.CheckUnitId))
{
this.ddlCheckUnitId.SelectedValue = superviseCheckReport.CheckUnitId;
}
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();
@@ -93,6 +104,8 @@ namespace FineUIPro.Web.ZHGL.Supervise
}
else
{
var thisUnit = BLL.CommonService.GetIsThisUnit();
this.ddlCheckUnitId.SelectedValue = thisUnit.UnitId;
this.txtCheckTeam.Text = BLL.UnitService.GetUnitNameByUnitId(this.CurrUser.UnitId) + this.CurrUser.UserName;
this.dpkCheckDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
}
@@ -102,6 +115,17 @@ namespace FineUIPro.Web.ZHGL.Supervise
}
}
/// <summary>
/// 检查大类下拉加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void drpCheckMainType_SelectedIndexChanged(object sender, EventArgs e)
{
//检查类别
BLL.SuperviseCheckTypeService.InitCheckTypeDropDownListByMainType(this.drpCheckType, this.drpCheckMainType.SelectedValue, false);
}
private void GetCheckItem()
{
for (int i = 0; i < Grid1.Rows.Count; i++)
@@ -175,12 +199,12 @@ namespace FineUIPro.Web.ZHGL.Supervise
{
lists += item.RectifyItemId + ",";
}
if (!string.IsNullOrEmpty(lists))
if (!string.IsNullOrWhiteSpace(lists))
{
lists = lists.Substring(0, lists.LastIndexOf(","));
}
string window = String.Format("ShowRectifyItem.aspx?lists={0}", lists, "选择 - ");
string type = this.drpCheckMainType.SelectedValue;
string window = String.Format("ShowRectifyItem.aspx?lists={0}&type={1}", lists, type, "选择 - ");
PageContext.RegisterStartupScript(Window2.GetSaveStateReference(hdItemId.ClientID)
+ Window2.GetShowReference(window));
}
@@ -194,7 +218,7 @@ namespace FineUIPro.Web.ZHGL.Supervise
/// <param name="e"></param>
protected void Window2_Close(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(hdItemId.Text))
if (!string.IsNullOrWhiteSpace(hdItemId.Text))
{
if (superviseCheckReportItems.Count == 0)
{
@@ -267,16 +291,26 @@ namespace FineUIPro.Web.ZHGL.Supervise
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (this.drpCheckMainType.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("检查大类不能为空!", MessageBoxIcon.Warning);
return;
}
if (this.drpCheckType.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("检查类别不能为空!", MessageBoxIcon.Warning);
return;
}
if (this.ddlCheckUnitId.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("检查单位不能为空!", MessageBoxIcon.Warning);
return;
}
Model.Supervise_SuperviseCheckReport superviseCheckReport = new Model.Supervise_SuperviseCheckReport
{
SuperviseCheckReportCode = this.txtSuperviseCheckReportCode.Text.Trim()
};
if (!string.IsNullOrEmpty(this.dpkCheckDate.Text.Trim()))
if (!string.IsNullOrWhiteSpace(this.dpkCheckDate.Text.Trim()))
{
superviseCheckReport.CheckDate = Convert.ToDateTime(this.dpkCheckDate.Text.Trim());
}
@@ -284,6 +318,10 @@ namespace FineUIPro.Web.ZHGL.Supervise
{
superviseCheckReport.CheckType = this.drpCheckType.SelectedValue;
}
if (this.drpCheckMainType.SelectedValue != BLL.Const._Null)
{
superviseCheckReport.CheckMainType = this.drpCheckMainType.SelectedValue;
}
if (this.ddlProjectId.SelectedValue != BLL.Const._Null)
{
superviseCheckReport.ProjectId = this.ddlProjectId.SelectedValue;
@@ -292,8 +330,12 @@ namespace FineUIPro.Web.ZHGL.Supervise
{
superviseCheckReport.UnitId = this.ddlUnitId.SelectedValue;
}
if (this.ddlCheckUnitId.SelectedValue != BLL.Const._Null)
{
superviseCheckReport.CheckUnitId = this.ddlCheckUnitId.SelectedValue;
}
superviseCheckReport.CheckTeam = this.txtCheckTeam.Text.Trim();
if (string.IsNullOrEmpty(this.SuperviseCheckReportId))
if (string.IsNullOrWhiteSpace(this.SuperviseCheckReportId))
{
superviseCheckReport.SuperviseCheckReportId = SQLHelper.GetNewID(typeof(Model.Supervise_SuperviseCheckReport));
SuperviseCheckReportId = superviseCheckReport.SuperviseCheckReportId;
@@ -339,7 +381,7 @@ namespace FineUIPro.Web.ZHGL.Supervise
protected void Window1_Close(object sender, EventArgs e)
{
jerqueSaveList();
if (!string.IsNullOrEmpty(hdAttachUrl.Text))
if (!string.IsNullOrWhiteSpace(hdAttachUrl.Text))
{
var item = superviseCheckReportItems.FirstOrDefault(x => x.SuperviseCheckReportItemId == hdId.Text);
item.AttachUrl = hdAttachUrl.Text;
@@ -422,21 +464,35 @@ namespace FineUIPro.Web.ZHGL.Supervise
/// <param name="e"></param>
protected void btnAttachUrl_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.SuperviseCheckReportId))
if (string.IsNullOrWhiteSpace(this.SuperviseCheckReportId))
{
if (this.drpCheckMainType.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("检查大类不能为空!", MessageBoxIcon.Warning);
return;
}
if (this.drpCheckType.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("检查类别不能为空!", MessageBoxIcon.Warning);
return;
}
if (this.ddlCheckUnitId.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("检查单位不能为空!", MessageBoxIcon.Warning);
return;
}
Model.Supervise_SuperviseCheckReport superviseCheckReport = new Model.Supervise_SuperviseCheckReport
{
SuperviseCheckReportCode = this.txtSuperviseCheckReportCode.Text.Trim()
};
if (!string.IsNullOrEmpty(this.dpkCheckDate.Text.Trim()))
if (!string.IsNullOrWhiteSpace(this.dpkCheckDate.Text.Trim()))
{
superviseCheckReport.CheckDate = Convert.ToDateTime(this.dpkCheckDate.Text.Trim());
}
if (this.drpCheckMainType.SelectedValue != BLL.Const._Null)
{
superviseCheckReport.CheckMainType = this.drpCheckMainType.SelectedValue;
}
if (this.drpCheckType.SelectedValue != BLL.Const._Null)
{
superviseCheckReport.CheckType = this.drpCheckType.SelectedValue;
@@ -449,8 +505,13 @@ namespace FineUIPro.Web.ZHGL.Supervise
{
superviseCheckReport.UnitId = this.ddlUnitId.SelectedValue;
}
if (this.ddlCheckUnitId.SelectedValue != BLL.Const._Null)
{
superviseCheckReport.CheckUnitId = this.ddlCheckUnitId.SelectedValue;
}
superviseCheckReport.CheckTeam = this.txtCheckTeam.Text.Trim();
if (string.IsNullOrEmpty(this.SuperviseCheckReportId))
if (string.IsNullOrWhiteSpace(this.SuperviseCheckReportId))
{
superviseCheckReport.SuperviseCheckReportId = SQLHelper.GetNewID(typeof(Model.Supervise_SuperviseCheckReport));
SuperviseCheckReportId = superviseCheckReport.SuperviseCheckReportId;