private void InitOrg() { OrganizationBLL bll = new OrganizationBLL(); IList <OrganizationInfo> orgList = bll.GetOrgList(); ddlOrg.Items.Clear(); foreach (OrganizationInfo info in orgList) { ListItem li = new ListItem(); li.Text = info.OrgName; li.Value = info.ID.ToString(); if (li.Value.Equals(OrgCode, StringComparison.OrdinalIgnoreCase)) { li.Selected = true; } ddlOrg.Items.Add(li); } //获取某个组织的信息 OrganizationInfo orgInfo = bll.GetOrgByID(ddlOrg.SelectedValue); if (orgInfo != null) { txtOrderNo.Text = orgInfo.OrderNo.ToString(); txtOrgCode.Text = orgInfo.OrgCode; txtOrgName.Text = orgInfo.OrgName; } }
private void BindOrg() { OrganizationBLL bll = new OrganizationBLL(); ddlOrg.DataSource = bll.GetOrgList(); ddlOrg.DataBind(); ddlOrg.Items.Insert(0, new ListItem("选择", "")); }
/// <summary> /// 取得组织信息 /// </summary> private string GetOrg(HttpContext context) { try { OrganizationBLL bll = new OrganizationBLL(); IList <OrganizationInfo> orgList = bll.GetOrgList(); DataTable dt = DataTableExtension.ToDataTable <OrganizationInfo>(orgList); string Id = context.Request.Form["id"]; string text = context.Request.Form["text"]; return(EasyUIJsonConvert.GetComboBoxJson(dt, Id, text)); } catch (Exception ex) { DBManager.RecoreErrorProfile(ex, "RuleDesignHandler.GetOrganization", DBManager.GetCurrentUserAD()); return("Fail"); } }