//浏览 private void btnScan_Click(object sender, EventArgs e) { DataRow dr = (this.dgvRecord.CurrentRow.DataBoundItem as DataRowView).Row; if (dr == null) { return; } UCOrganizeAddOrEdit ucOrgView = new UCOrganizeAddOrEdit(); ucOrgView.uc = this; ucOrgView.windowStatus = WindowStatus.View; ucOrgView.drRecord = dr; base.addUserControl(ucOrgView, "组织管理-浏览", dr["org_id"].ToString(), this.Tag.ToString(), this.Name); }
/// <summary> 查看那 /// </summary> void dgvRecord_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { DataRow dr = (this.dgvRecord.CurrentRow.DataBoundItem as DataRowView).Row; if (dr == null) { return; } try { UCOrganizeAddOrEdit ucOrgView = new UCOrganizeAddOrEdit(); ucOrgView.uc = this; ucOrgView.windowStatus = WindowStatus.View; ucOrgView.drRecord = dr; base.addUserControl(ucOrgView, "组织管理-查看", dr["org_id"].ToString(), this.Tag.ToString(), this.Name); } catch (Exception ex) { GlobalStaticObj_Server.GlobalLogService.WriteLog("组织管理", ex); MessageBoxEx.ShowWarning("程序异常"); } }
/// <summary> /// 添加或者编辑 /// </summary> /// <param name="status"></param> /// <param name="menuName"></param> private void AddOrEdit(WindowStatus status, string menuName) { try { DataRow dr = null; string menuId = string.Empty; if (status == WindowStatus.Add) { menuId = "Organize_Add"; } else { if (this.dgvRecord.CurrentRow == null) { return; } dr = (this.dgvRecord.CurrentRow.DataBoundItem as DataRowView).Row; menuId = dr["org_id"].ToString(); } UCOrganizeAddOrEdit orgAddOrEdit = new UCOrganizeAddOrEdit(); orgAddOrEdit.uc = this; orgAddOrEdit.drRecord = dr; orgAddOrEdit.windowStatus = status; base.addUserControl(orgAddOrEdit, menuName, menuId, this.Tag.ToString(), this.Name); } catch (Exception ex) { GlobalStaticObj_Server.GlobalLogService.WriteLog("组织管理", ex); MessageBoxEx.ShowWarning("程序异常"); } }
/// <summary> /// 添加或者编辑 /// </summary> /// <param name="status"></param> /// <param name="menuName"></param> private void AddOrEdit(WindowStatus status, string menuName) { DataRow dr = null; string menuId = string.Empty; if (status == WindowStatus.Add) { menuId = "Organize_Add"; } else { if (this.dgvRecord.CurrentRow == null) { return; } dr = (this.dgvRecord.CurrentRow.DataBoundItem as DataRowView).Row; menuId = dr["org_id"].ToString(); } UCOrganizeAddOrEdit orgAddOrEdit = new UCOrganizeAddOrEdit(); orgAddOrEdit.uc = this; orgAddOrEdit.drRecord = dr; orgAddOrEdit.windowStatus = status; base.addUserControl(orgAddOrEdit, menuName, menuId, this.Tag.ToString(), this.Name); }