Exemple #1
0
        private void LoadKitchenText()
        {
            SortedList slKitchenText = new SortedList();
            SystemManager objSystem = new SystemManager();
            CResult objCresult = new CResult();

            if (m_specialModifyText == false) //If for kitchen text
            {
                objCresult = objSystem.GetAllKitchenText();
                slKitchenText = (SortedList)objCresult.Data;
                dgvKitchenText.RowCount = 0;

                foreach (clsKitchenText objKitchenText in slKitchenText.Values)
                {
                    DataGridViewRowCollection dgvRow = (DataGridViewRowCollection)dgvKitchenText.Rows;
                    dgvRow.Add(objKitchenText.KitchenTextId, objKitchenText.KitchenText);
                }
            }
            else //If for special modification
            {
                objCresult = objSystem.GetAllSpecialModifyText();

                slKitchenText = (SortedList)objCresult.Data;
                dgvKitchenText.RowCount = 0;

                foreach (clsSpecialModfifyText objSpecialText in slKitchenText.Values)
                {
                    DataGridViewRowCollection dgvRow = (DataGridViewRowCollection)dgvKitchenText.Rows;
                    dgvRow.Add(objSpecialText.SpecialModfifyTextId, objSpecialText.SpecialModfifyText);
                }
            }

            dgvKitchenText.ClearSelection();
            txtKitchenText.Clear();
        }
Exemple #2
0
        private void LoadKitchenTextButtons()
        {
            try
            {
                SortedList slKitchenText = new SortedList();
                SystemManager objSystem = new SystemManager();
                CResult objCresult = new CResult();
                objCresult = objSystem.GetAllKitchenText();
                slKitchenText = (SortedList)objCresult.Data;

                int buttonCount = slKitchenText.Count;
                buttons = new  Button[buttonCount];
                int btnCounter = 0;
                foreach (clsKitchenText objKitchenText in slKitchenText.Values)
                {
                    DataGridViewRowCollection dgvRow = (DataGridViewRowCollection)dgvKitchenText.Rows;
                    dgvRow.Add(new object[]{objKitchenText.KitchenText});
                    btnCounter++;
                }
                }
            catch (Exception exp)
            {
                throw exp;
            }
        }