Пример #1
0
        private void Temp_Click(object sender, EventArgs e)
        {
            Label lb = sender as Label;

            Tiname = lb.Text.Trim();
            m_menu_list mml = new m_menu_list();

            mml.Select("and tname='" + Tiname + "' and uname='" + Uiname + "'");
        }
Пример #2
0
        private void Ad_Click(object sender, EventArgs e)
        {
            if (Uiname == "" || Uiname is null || Tiname == "" || Tiname is null)
            {
                return;
            }

            string Miname = string.Empty;

            if (Mlist.Count <= 0)
            {
                Miname = "";
            }
            else
            {
                for (int i = 0; i < Mlist.Count; i++)
                {
                    Miname += Mlist[i] + ",";
                }
                Miname = Ifun.Left(Miname, Miname.Length - 1);
            }

            m_menu_list        mml = new m_menu_list();
            List <m_menu_list> ms  = mml.Select("and tname='" + Tiname + "' and uname='" + Uiname + "'");

            mml.Reset_m_menu_list();
            mml.UNAME = Uiname;
            mml.TNAME = Tiname;
            mml.MNAME = Miname;
            if (ms.Count > 0)
            {
                mml.Updata("and tname='" + Tiname + "' and uname='" + Uiname + "'");
            }
            else
            {
                mml.Insert();
            }

            Msg err = new Msg(3, "保存成功!");
        }