Esempio n. 1
0
        private void AddItemUsrCtrl_Load(object sender, EventArgs e)
        {
            CategoryDAO     categoryDAORef = new CategoryDAOImpl();
            List <Category> categoryRef    = categoryDAORef.getcategoryList(null);

            foreach (Category c in categoryRef)
            {
                categoryTxt.Items.Add(c.categoryName);
            }
        }
Esempio n. 2
0
        private void searchCategorynameBtn_Click(object sender, EventArgs e)
        {
            flag = 1;
            Category categoryRef1 = new Category();

            categoryRef1.categoryName = categorynameTxt.Text;
            CategoryDAO     categoryDAORef = new CategoryDAOImpl();
            List <Category> categoryRef    = new List <Category>();

            categoryRef = categoryDAORef.getcategoryList(categoryRef1);
            Console.WriteLine("size of List :{0}", categoryRef);

            /* foreach (Category catgry in categoryRef)
             *   Console.WriteLine("category name:{0} \n category value:{1}", categoryRef.); */
            dataGridViewTest.DataSource = categoryRef;

            // dataGridViewTest.SelectedCells[0].ReadOnly = true;
        }
Esempio n. 3
0
        private void PlaceOrderUsrCtrl_Load(object sender, EventArgs e)
        {
            loginPage loginPageRef = new loginPage();

            username = loginPageRef.username;
            mobileNo = loginPageRef.mobileNo;
            EmailId  = loginPageRef.EmailId;


            CategoryDAO     categoryDAORef = new CategoryDAOImpl();
            List <Category> categoryRef    = categoryDAORef.getcategoryList(null);

            foreach (Category c in categoryRef)
            {
                categorynameCmb.Items.Add(c.categoryName);
            }

            //OrderCredentials orderCredentialsRef = new OrderCredentials(billNo++, dateTime);
            //OrderCredentialsDAO orderCrDAORef = new OrderCredentialsDAOImpl();
            //orderCrDAORef.insertOrderCredentials(orderCredentialsRef);
        }
Esempio n. 4
0
        private void testBtn_Click(object sender, EventArgs e)
        {
            flag = 1;

            CategoryDAO     categoryDAORef = new CategoryDAOImpl();
            List <Category> categoryRef    = new List <Category>();

            categoryRef = categoryDAORef.getcategoryList(null);
            Console.WriteLine("size of List :{0}", categoryRef);

            /* foreach (Category catgry in categoryRef)
             *   Console.WriteLine("category name:{0} \n category value:{1}", categoryRef.); */
            dataGridViewTest.DataSource = categoryRef;
            dataGridViewTest.SelectedCells[0].ReadOnly = true;
            // Console.WriteLine("selected cell :{0}", dataGridViewTest.SelectedCells[0].ReadOnly);


            //  categoryDAORef.deleteCategory();

            deleteBtn.Visible = true;
        }