private void BindCustomResponsibility() { DropDownListCustomResponsibility.DataSource = SPARInsightManagement.Web.Code.CustomResponsibility.GetCustomResponsibilityList(); DropDownListCustomResponsibility.DataTextField = "Description"; DropDownListCustomResponsibility.DataValueField = "CustomResponsibilityId"; DropDownListCustomResponsibility.DataBind(); if (DropDownListCustomResponsibility.Items.Count > 1) { DropDownListCustomResponsibility.Items.Insert(0, new ListItem("Please select", "0")); } }
private void BindCustomDetail(int customDetailId) { InsightSupplierCustomDetail insightSupplierCustomDetail = InsightSupplierCustomDetail.GetInsightSupplierCustomDetailByInsightSupplierCustomDetailId(customDetailId); this.insightSupplierCustomDetailId = insightSupplierCustomDetail.InsightSupplierCustomDetailId; this.insightSupplierId = insightSupplierCustomDetail.InsightSupplierId; DropDownListCustomType.ClearSelection(); DropDownListCustomType.Items.FindByValue(insightSupplierCustomDetail.CustomTypeId.ToString()).Selected = true; DropDownListCustomFrequency.ClearSelection(); DropDownListCustomFrequency.Items.FindByValue(insightSupplierCustomDetail.CustomFrequencyId.ToString()).Selected = true; DropDownListCustomResponsibility.ClearSelection(); DropDownListCustomResponsibility.Items.FindByValue(insightSupplierCustomDetail.CustomResponsibilityId.ToString()).Selected = true; TextBoxDetail.Text = insightSupplierCustomDetail.Detail; TextBoxSourceFile.Text = insightSupplierCustomDetail.SourceFile; DropDownListStatus.ClearSelection(); DropDownListStatus.Items.FindByValue(insightSupplierCustomDetail.StatusId.ToString()).Selected = true; }