public static string[] GetClassValue(int classId) { EasyDataProvide ModuleClass = new EasyDataProvide("ModuleClass"); DataTable dtClass = ModuleClass.GetAllData(); string[] classValues = new string[3]; DataView dv3 = new DataView(dtClass); dv3.RowFilter = "id=" + classId; if (dv3.Count > 0) { classValues[2] = dv3[0]["id"].ToString(); DataView dv2 = new DataView(dtClass); dv2.RowFilter = "id=" + dv3[0]["parentID"].ToString(); if (dv2.Count > 0) { classValues[1] = dv2[0]["id"].ToString(); DataView dv1 = new DataView(dtClass); dv1.RowFilter = "id=" + dv2[0]["parentID"].ToString(); if (dv1.Count > 0) { classValues[0] = dv1[0]["id"].ToString(); } } } return classValues; }
private void Show() { DataTable dt = _EmailTemplats.GetAllData(); gvList.DataSource = dt; gvList.DataBind(); }
static public string[] GetClassValue(int classId) { EasyDataProvide ModuleClass = new EasyDataProvide("ModuleClass"); DataTable dtClass = ModuleClass.GetAllData(); string[] classValues = new string[3]; DataView dv3 = new DataView(dtClass); dv3.RowFilter = "id=" + classId; if (dv3.Count > 0) { classValues[2] = dv3[0]["id"].ToString(); DataView dv2 = new DataView(dtClass); dv2.RowFilter = "id=" + dv3[0]["parentID"].ToString(); if (dv2.Count > 0) { classValues[1] = dv2[0]["id"].ToString(); DataView dv1 = new DataView(dtClass); dv1.RowFilter = "id=" + dv2[0]["parentID"].ToString(); if (dv1.Count > 0) { classValues[0] = dv1[0]["id"].ToString(); } } } return(classValues); }
private void ShowOrg() { EasyDataProvide UnitName = new EasyDataProvide("UnitName"); DataTable dt = UnitName.GetAllData(); ddlOrg.DataSource = dt; ddlOrg.DataBind(); }
private void Show() { TIN.EasyDataProvide UnitName = new EasyDataProvide("UnitName"); DataTable dt = UnitName.GetAllData(); gvList.DataSource = dt; gvList.DataBind(); }
private void ShowCustomer() { TIN.EasyDataProvide Customer = new EasyDataProvide("Customer"); DataTable dt = Customer.GetAllData(); ddlCustomer.DataTextField = "aliasName"; ddlCustomer.DataValueField = "id"; ddlCustomer.DataSource = dt; ddlCustomer.DataBind(); }
private void ShowOrg() { EasyDataProvide UnitName = new EasyDataProvide("UnitName"); DataTable dt = UnitName.GetAllData(); ddlOrg.DataSource = dt; ddlOrg.DataBind(); ListItem item = new ListItem("全部", ""); ddlOrg.Items.Insert(0, item); }
private void ShowCustomer() { TIN.EasyDataProvide Customer = new EasyDataProvide("Customer"); DataTable dt = Customer.GetAllData(); ddlCustomer.DataTextField = "aliasName"; ddlCustomer.DataValueField = "id"; ddlCustomer.DataSource = dt; ddlCustomer.DataBind(); ListItem item = new ListItem("全部", ""); ddlCustomer.Items.Insert(0, item); }
private void ShowRole() { EasyDataProvide role = new EasyDataProvide("Role"); DataTable dtRole = role.GetAllData(); ddlRole.DataTextField = "roleName"; ddlRole.DataValueField = "id"; ddlRole.DataSource = dtRole; ddlRole.DataBind(); if (ddlRole.Items.Count == 0) { trRole.Visible = false; } }
private void ShowOrganization() { EasyDataProvide UnitName = new EasyDataProvide("UnitName"); DataTable dtUnitName = UnitName.GetAllData("order by listNum"); OrganizationID.DataTextField = "title"; OrganizationID.DataValueField = "id"; OrganizationID.DataSource = dtUnitName; OrganizationID.DataBind(); ListItem item = new ListItem("未指定", "0"); OrganizationID.Items.Add(item); if (OrganizationID.Items.Count == 1) { trUnit.Visible = false; } }