private void Add_Action_SimpleButton_Click(object sender, EventArgs e) { #region 打开添加页面 var uc = new Batch_Edit_XtraUserControl(); uc.State = FormState.Add; var shell = new Shell_XtraForm() { ManualWidth = uc.Width, ManualHeight = uc.Height + 50 }; uc.FormContainer = shell; shell.ResizeForm(); shell.LoadControl(uc); shell.Closed += (obj, arg) => BindData(paging_XtraUserControl1.MyPagingHelper.PageIndex); shell.Show(); #endregion }
private void Edit_RepositoryItemHyperLinkEdit_Click(object sender, EventArgs e) { var model = gridView1.GetRow(gridView1.FocusedRowHandle) as Batch; if (model != null) { #region 打开编辑页面 var uc = new Batch_Edit_XtraUserControl(); uc.BatchID = model.BatchID.ToString(); uc.State = FormState.Edit; var shell = new Shell_XtraForm() { ManualWidth = uc.Width, ManualHeight = uc.Height + 50 }; uc.FormContainer = shell; shell.ResizeForm(); shell.LoadControl(uc); shell.Closed += (obj, arg) => BindData(paging_XtraUserControl1.MyPagingHelper.PageIndex); shell.Show(); #endregion } }