Ejemplo n.º 1
0
        protected void FillDropDownList()
        {
            CompanyManger company = new CompanyManger();

            DropDownCompanyList.DataSource     = company.GetAllCompany();
            DropDownCompanyList.DataTextField  = "CompanyName";
            DropDownCompanyList.DataValueField = "CompanyID";
            DropDownCompanyList.DataBind();
            DropDownCompanyList.Items.Insert(0, new ListItem("Select", "0"));
        }
        protected void FillDropDownList()
        {
            CompanyManger company = new CompanyManger();

            DropDownCompanyList.DataSource     = company.GetAllCompany();
            DropDownCompanyList.DataTextField  = "CompanyName";
            DropDownCompanyList.DataValueField = "CompanyID";
            DropDownCompanyList.DataBind();
            DropDownCompanyList.Items.Insert(0, new System.Web.UI.WebControls.ListItem("Select", "0"));

            ItemManager itemManager = new ItemManager();

            DropDownCategoryList.DataSource     = itemManager.GetAllCategory();
            DropDownCategoryList.DataTextField  = "CategoryName";
            DropDownCategoryList.DataValueField = "CategoryID";
            DropDownCategoryList.DataBind();
            DropDownCategoryList.Items.Insert(0, new System.Web.UI.WebControls.ListItem("Select", "0"));
        }
Ejemplo n.º 3
0
 public CompanyController(IDbConnection context, IMapper mapper, CompanyManger CmpManager)
 {
     _context    = context;
     _CmpManager = CmpManager;
     _mapper     = mapper;
 }