private void ShowPMItems() { try { pmsched = new clsPMSchedService(); pmsched.iOrgId = OrgId; pmsched.iInspectItemId = ItemId; dsPMSchedServices = pmsched.GetPMSchedPMServicesList(); dsPMSchedServices.Relations.Add(new DataRelation("Schedules_Services", dsPMSchedServices.Tables["Table"].Columns["Id"], dsPMSchedServices.Tables["Table1"].Columns["PMSchedId"])); ddlPMSchedules.DataSource = dsPMSchedServices; ddlPMSchedules.DataMember = "Table"; ddlPMSchedules.DataBind(); ddlPMServices.DataSource = dsPMSchedServices; ddlPMServices.DataMember = "Table1"; ddlPMServices.DataBind(); ListLink.Enabled = true; ListLink.DataBind(); } catch (Exception ex) { throw new Exception(ex.Message, ex); } finally { if (pmsched != null) { pmsched.Dispose(); } } }