提交定制会内容
This commit is contained in:
@@ -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,BLL.Const.UnitId_SEDIN, 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.PersonName;
|
||||
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++)
|
||||
@@ -109,9 +133,11 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
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";
|
||||
//Grid1.Rows[i].Values[6] = "True";
|
||||
checkField.SetCheckedState(i, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -173,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));
|
||||
}
|
||||
@@ -192,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)
|
||||
{
|
||||
@@ -265,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());
|
||||
}
|
||||
@@ -282,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;
|
||||
@@ -290,10 +330,15 @@ 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;
|
||||
BLL.SuperviseCheckReportService.AddSuperviseCheckReport(superviseCheckReport);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, superviseCheckReport.SuperviseCheckReportCode, superviseCheckReport.SuperviseCheckReportId, BLL.Const.SuperviseCheckReportMenuId, Const.BtnAdd);
|
||||
}
|
||||
@@ -323,7 +368,6 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
};
|
||||
BLL.SuperviseCheckReportItemService.AddSuperviseCheckReportItem(superviseCheckReportItem);
|
||||
}
|
||||
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
#endregion
|
||||
@@ -337,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;
|
||||
@@ -411,5 +455,106 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
this.ddlUnitId.Items.Clear();
|
||||
BLL.UnitService.InitUnitDropDownList(this.ddlUnitId, this.ddlProjectId.SelectedValue, true);
|
||||
}
|
||||
|
||||
#region 附件上传
|
||||
/// <summary>
|
||||
/// 上传附件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttachUrl_Click(object sender, EventArgs e)
|
||||
{
|
||||
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.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;
|
||||
}
|
||||
if (this.ddlProjectId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
superviseCheckReport.ProjectId = this.ddlProjectId.SelectedValue;
|
||||
}
|
||||
if (this.ddlUnitId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
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.IsNullOrWhiteSpace(this.SuperviseCheckReportId))
|
||||
{
|
||||
superviseCheckReport.SuperviseCheckReportId = SQLHelper.GetNewID(typeof(Model.Supervise_SuperviseCheckReport));
|
||||
SuperviseCheckReportId = superviseCheckReport.SuperviseCheckReportId;
|
||||
BLL.SuperviseCheckReportService.AddSuperviseCheckReport(superviseCheckReport);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, superviseCheckReport.SuperviseCheckReportCode, superviseCheckReport.SuperviseCheckReportId, BLL.Const.SuperviseCheckReportMenuId, Const.BtnAdd);
|
||||
}
|
||||
else
|
||||
{
|
||||
var report = BLL.SuperviseCheckReportService.GetSuperviseCheckReportById(this.SuperviseCheckReportId);
|
||||
if (report.IsIssued == "1") //已下发
|
||||
{
|
||||
ShowNotify("已下发检查整改,无法修改!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
superviseCheckReport.SuperviseCheckReportId = this.SuperviseCheckReportId;
|
||||
BLL.SuperviseCheckReportService.UpdateSuperviseCheckReport(superviseCheckReport);
|
||||
BLL.SuperviseCheckReportItemService.DeleteSuperviseCheckReportItemBySuperviseCheckReportId(this.SuperviseCheckReportId);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, superviseCheckReport.SuperviseCheckReportCode, superviseCheckReport.SuperviseCheckReportId, BLL.Const.SuperviseCheckReportMenuId, Const.BtnModify);
|
||||
}
|
||||
jerqueSaveList();
|
||||
foreach (var item in superviseCheckReportItems)
|
||||
{
|
||||
Model.Supervise_SuperviseCheckReportItem superviseCheckReportItem = new Model.Supervise_SuperviseCheckReportItem
|
||||
{
|
||||
SuperviseCheckReportItemId = item.SuperviseCheckReportItemId,
|
||||
SuperviseCheckReportId = superviseCheckReport.SuperviseCheckReportId,
|
||||
RectifyItemId = item.RectifyItemId,
|
||||
IsSelected = item.IsSelected,
|
||||
AttachUrl = item.AttachUrl
|
||||
};
|
||||
BLL.SuperviseCheckReportItemService.AddSuperviseCheckReportItem(superviseCheckReportItem);
|
||||
}
|
||||
}
|
||||
if (btnSave.Hidden == true)
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/SuperviseCheckReportEdit&type=-1&menuId={1}", SuperviseCheckReportId, BLL.Const.SuperviseCheckReportMenuId)));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/SuperviseCheckReportEdit&menuId={1}", SuperviseCheckReportId, BLL.Const.SuperviseCheckReportMenuId)));
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user