修改项目成立页面保存后刷新问题

This commit is contained in:
高飞 2023-10-31 12:42:06 +08:00
parent fa926c80f1
commit 431c62a9a5
5 changed files with 61 additions and 36 deletions

View File

@ -46,6 +46,7 @@
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" Icon="FolderUp"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
<f:HiddenField runat="server" ID="hdStr"></f:HiddenField>
</Items>
</f:Toolbar>
</Toolbars>
@ -124,7 +125,7 @@
</f:Panel>
<f:Window ID="Window1" Title="项目" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Maximized="true"
Width="1200px" Height="650px">
Width="1200px" Height="650px" OnClose="Window1_Close">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" Icon="Pencil" EnablePostBack="true" Hidden="true"

View File

@ -29,6 +29,12 @@ namespace FineUIPro.Web.ProjectData
}
#endregion
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
// 绑定表格
this.BindGrid();
}
#region
/// <summary>
/// 绑定数据
@ -79,6 +85,13 @@ namespace FineUIPro.Web.ProjectData
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
Grid1.DataSource = this.GetPagedDataTable(Grid1, tb);
string str = this.hdStr.Text;
if (!string.IsNullOrEmpty(str))
{
string[] strs = str.Split(',');
Grid1.PageIndex = Funs.GetNewIntOrZero(strs[0]);
Grid1.PageSize = Funs.GetNewIntOrZero(strs[1]);
}
Grid1.DataBind();
}
#endregion
@ -127,6 +140,7 @@ namespace FineUIPro.Web.ProjectData
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
this.hdStr.Text = string.Empty;
BindGrid();
}
@ -137,6 +151,7 @@ namespace FineUIPro.Web.ProjectData
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
this.hdStr.Text = string.Empty;
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
@ -184,7 +199,8 @@ namespace FineUIPro.Web.ProjectData
{
if (this.CurrUser.PersonId == BLL.Const.sysglyId) //系统管理员可修改停工或竣工的状态
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectSetSave.aspx?ProjectId={0}", Grid1.SelectedRowID, "编辑 - ")));
//PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectSetSave.aspx?ProjectId={0}&PageIndex={1}&PageSize={2}", Grid1.SelectedRowID, Grid1.PageIndex, Grid1.PageSize, "编辑 - ")));
PageContext.RegisterStartupScript(Window1.GetSaveStateReference(hdStr.ClientID) + Window1.GetShowReference(String.Format("ProjectSetSave.aspx?ProjectId={0}&PageIndex={1}&PageSize={2}", Grid1.SelectedRowID, Grid1.PageIndex, Grid1.PageSize, "编辑 - ")));
}
else
{
@ -199,7 +215,8 @@ namespace FineUIPro.Web.ProjectData
}
else
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectSetSave.aspx?ProjectId={0}", Grid1.SelectedRowID, "编辑 - ")));
//PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectSetSave.aspx?ProjectId={0}&PageIndex={1}&PageSize={2}", Grid1.SelectedRowID, Grid1.PageIndex, Grid1.PageSize, "编辑 - ")));
PageContext.RegisterStartupScript(Window1.GetSaveStateReference(hdStr.ClientID) + Window1.GetShowReference(String.Format("ProjectSetSave.aspx?ProjectId={0}&PageIndex={1}&PageSize={2}", Grid1.SelectedRowID, Grid1.PageIndex, Grid1.PageSize, "编辑 - ")));
}
}
}

View File

@ -7,12 +7,10 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.ProjectData
{
namespace FineUIPro.Web.ProjectData {
public partial class ProjectSet
{
public partial class ProjectSet {
/// <summary>
/// form1 控件。
@ -104,6 +102,15 @@ namespace FineUIPro.Web.ProjectData
/// </remarks>
protected global::FineUIPro.Button btnOut;
/// <summary>
/// hdStr 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdStr;
/// <summary>
/// lblNumber 控件。
/// </summary>

View File

@ -150,8 +150,8 @@ namespace FineUIPro.Web.ProjectData
Country = this.txtCountry.Text.Trim(),
City = this.txtCity.Text.Trim(),
EnglishRemark = this.txtEnglishRemark.Text.Trim(),
ProjectRealCode=this.txtProjectRealCode.Text.Trim(),
IsCNCECShow=Convert.ToBoolean( this.rbIsCNCECShow.SelectedValue),
ProjectRealCode = this.txtProjectRealCode.Text.Trim(),
IsCNCECShow = Convert.ToBoolean(this.rbIsCNCECShow.SelectedValue),
};
if (!string.IsNullOrEmpty(txtStartDate.Text.Trim()))
@ -207,7 +207,7 @@ namespace FineUIPro.Web.ProjectData
// 2. 关闭本窗体,然后刷新父窗体
// PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
// 2. 关闭本窗体,然后回发父窗体
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(Request.Params["PageIndex"] + "," + Request.Params["PageSize"]) + ActiveWindow.GetHidePostBackReference());
//PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(wedId) + ActiveWindow.GetHideReference());
}