// 显示订单(想办法弄个参数回来,是否已经支付) public static bool ShowOrder(FineUI.Window win, int?orderId) { if (orderId != null) { var url = string.Format("OrderForm.aspx?id={0}&mode=view", orderId); var script = win.GetShowReference(url); PageContext.RegisterStartupScript(script); return(true); } return(false); }
/// <summary> /// 新增事件 /// </summary> /// <param name="Window1">WindowId</param> /// <param name="AddPage">编辑页面</param> /// <param name="WindowTitle">窗体标题</param> protected void AddClick(Window Window1, string AddPage, string WindowTitle) { PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("{0}.aspx?action=1", AddPage), WindowTitle)); }
/// <summary> /// 通用编辑单击事件 /// </summary> /// <param name="Grid1">Grid</param> /// <param name="Window1">Window Id</param> /// <param name="EditPage">编辑页面名称</param> /// <param name="WindowTitle">窗体标题</param> protected void EditClick(Grid Grid1, Window Window1, string EditPage, string WindowTitle) { try { if (Grid1.SelectedRowIndexArray.Length == 0) { Alert.Show("请至少选择一项!", MessageBoxIcon.Information); } else if (Grid1.SelectedRowIndexArray.Length > 1) { Alert.Show("只能选择一项!", MessageBoxIcon.Information); } else { string id = Grid1.DataKeys[Grid1.SelectedRowIndexArray[0]][0].ToString(); PageContext.RegisterStartupScript( Window1.GetShowReference(string.Format("{0}.aspx?id={1}&action=2", EditPage, id), WindowTitle)); } } catch (Exception) { Alert.Show("编辑失败,请重试!", MessageBoxIcon.Warning); } }