Esempio n. 1
0
        //构造函数
        public MenuCatgoryForm(BathDBDataContext dc, Catgory curCat)
        {
            db = dc;
            if (curCat != null)
            {
                newCat = false;
                m_cat = curCat;
            }

            InitializeComponent();
        }
Esempio n. 2
0
 partial void DeleteCatgory(Catgory instance);
Esempio n. 3
0
 partial void UpdateCatgory(Catgory instance);
Esempio n. 4
0
 partial void InsertCatgory(Catgory instance);
Esempio n. 5
0
        //创建菜单类别界面
        private void createMenuTypePanel()
        {
            cPanel.Controls.Clear();
            bool first = true;
            int x = 10;
            int y = 9;

            //createButton(x, y, "技师", cPanel, 1, Color.Blue);
            //x += 80;

            //var typeLst = db.Catgory.Select(s => s.name);
            for (int i = m_index; i < typeList.Count(); i++ )
            {
                Color color = first ? Color.Orange : Color.Blue;
                first = false;
                createButton(x, y, typeList.ToArray()[i], cPanel, 1, color);
                x += 80;
            }
            m_Catgory = db.Catgory.FirstOrDefault(z => z.name == typeList[0]);
            createMenuPanel();
        }
Esempio n. 6
0
        //点击菜式类别
        private void btnType_Click(object sender, EventArgs e)
        {
            Button btn = sender as Button;
            foreach (Control c in cPanel.Controls)
                c.BackColor = Color.Blue;
            btn.BackColor = Color.Orange;

            m_Catgory = db.Catgory.FirstOrDefault(x => x.name == btn.Text);
            createMenuPanel();
        }