Example #1
0
 private void cmbParent_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cnt > 0)
     {
         Int32 parentId = Convert.ToInt32(cmbParent.SelectedValue);
         CCategory1DAO aCategory1Dao = new CCategory1DAO();
         List<CCategory1> category1s = aCategory1Dao.GetCategory1IdByParentId(parentId);
         cmbCategory1.DataSource = category1s;
     }
 }
Example #2
0
        private void AddFoodItemCtl_Load(object sender, EventArgs e)
        {
            CCategoryAncestorDAO cCategoryAncestorDao = new CCategoryAncestorDAO();
            CResult oResult = cCategoryAncestorDao.GetCategoryAnchestors(m_iCat3ID, 3);
            CCategoryAncestor oCatAnc = (CCategoryAncestor)oResult.Data;
            LoadRawMaterialCategory(); // add by deb for inventory system
            this.FillParentCategory();
            cmbParent.SelectedValue = oCatAnc.ParentCategoryID;

            Int32 parentId = Convert.ToInt32(cmbParent.SelectedValue);
            CCategory1DAO aCategory1Dao = new CCategory1DAO();
            List<CCategory1> category1s = aCategory1Dao.GetCategory1IdByParentId(parentId);

            cmbCategory1.DisplayMember = "Category1Name";
            cmbCategory1.ValueMember = "Category1ID";
            cmbCategory1.DataSource = category1s;
            cmbCategory1.SelectedValue = oCatAnc.Category1ID;
            int cat1Id = Convert.ToInt32(cmbCategory1.SelectedValue);

            FillFoodType(cat1Id);
            cmbFoodType.SelectedValue = oCatAnc.Category2ID;

            Int32 foodTypeID = Convert.ToInt32(cmbFoodType.SelectedValue);
            FillFoodCategory(foodTypeID);
            cmbCategory.SelectedValue = m_iCat3ID;

            //cmbCategory.SelectedValue = objFoodItemUpdate.Category3ID;

            this.FillAllUoMCmb();

            if (m_iCat3ID > 0)
            {
                //         this.showExistingData();
            }

            //LoadRawProduct();
        }