Exemplo n.º 1
0
        protected void DataBind_OpportunityType()
        {
            OpportunityType oppType = new OpportunityType();

            ddlType.DataSource     = oppType.GetAllOpportunityTypes();
            ddlType.DataTextField  = "Name";
            ddlType.DataValueField = "OpportunityTypeId";
            ddlType.DataBind();
        }
Exemplo n.º 2
0
        public List <OpportunityType> GetAllOpportunityTypes()
        {
            var reader = dbHelper.GetOpportunityType(Constant.SP_GetOpportunityType);

            List <OpportunityType> oppTypeList = new List <OpportunityType>();
            OpportunityType        oppType     = null;

            while (reader.Read())
            {
                oppType = new OpportunityType();
                oppType.OpportunityTypeId = Convert.ToInt32(reader["OpportunityTypeId"]);
                oppType.Name = reader["Name"].ToString();

                oppTypeList.Add(oppType);
            }

            return(oppTypeList);
        }