private void LoadDDl() { Pricing.BLL.TicketStatus status = new Pricing.BLL.TicketStatus(); status.LoadAll(); uiDropDownListStatus.DataSource = status.DefaultView; uiDropDownListStatus.DataTextField = Pricing.BLL.TicketStatus.ColumnNames.Name; uiDropDownListStatus.DataValueField = Pricing.BLL.TicketStatus.ColumnNames.TicketStatusID; uiDropDownListStatus.DataBind(); }
private void LoadDDl() { Pricing.BLL.TicketStatus status = new Pricing.BLL.TicketStatus(); status.LoadAll(); uiDropDownListStatus.DataSource = status.DefaultView; uiDropDownListStatus.DataTextField = Pricing.BLL.TicketStatus.ColumnNames.Name; uiDropDownListStatus.DataValueField = Pricing.BLL.TicketStatus.ColumnNames.TicketStatusID; uiDropDownListStatus.DataBind(); // Remove from the status list - the last status for the current ticket - to prevent status duplication . Pricing.BLL.Tickets obj = new Pricing.BLL.Tickets(); obj.LoadByPrimaryKey(TicketID); ListItem item = uiDropDownListStatus.Items.FindByValue(obj.TicketStatusID.ToString()); uiDropDownListStatus.Items.Remove(item); }