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

            InitializeComponent();
        }
示例#2
0
 partial void DeleteCatgory(Catgory instance);
示例#3
0
 partial void UpdateCatgory(Catgory instance);
示例#4
0
 partial void InsertCatgory(Catgory instance);
示例#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();
        }
示例#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();
        }