protected void bt_Add_Click(object sender, EventArgs e) { if (tr_Position.SelectValue != "0") { int position = int.Parse(tr_Position.SelectValue); int beginday = int.Parse(tbx_BeginDay.Text); int endday = int.Parse(tbx_EndDay.Text); EWF_Flow_InitPositionBLL bll = new EWF_Flow_InitPositionBLL(); bll.Model.App = (Guid)ViewState["AppID"]; bll.Model.Position = position; bll.Model.BeginDay = beginday; bll.Model.EndDay = endday; bll.Add(); if (cb_IncludeChild.Checked) { DataTable dt = TreeTableBLL.GetAllChildByNodes("MCS_SYS.dbo.Org_Position", "ID", "SuperID", tr_Position.SelectValue); foreach (DataRow dr in dt.Rows) { bll.Model.ID = Guid.NewGuid(); bll.Model.Position = (int)dr["ID"]; bll.Add(); } } } BindGrid(); }
private void BindGrid() { IList <EWF_Flow_InitPosition> list = EWF_Flow_InitPositionBLL.GetModelList("App='" + ViewState["AppID"].ToString() + "'"); gv_List.BindGrid <EWF_Flow_InitPosition>(list); }