Exemplo n.º 1
0
        //确定
        private void btnOk_Click(object sender, EventArgs e)
        {
            MemberSetting ms;
            if (db.MemberSetting.Count() == 0)
                ms = new MemberSetting();
            else
                ms = db.MemberSetting.FirstOrDefault();

            ms.id = 0;
            ms.money = Convert.ToInt32(creditMoney.Text);
            ms.cardType = cardType.Text;

            if (db.MemberSetting.Count() == 0)
                db.MemberSetting.InsertOnSubmit(ms);

            db.SubmitChanges();
            this.DialogResult = DialogResult.OK;
        }
Exemplo n.º 2
0
 partial void UpdateMemberSetting(MemberSetting instance);
Exemplo n.º 3
0
 partial void DeleteMemberSetting(MemberSetting instance);
Exemplo n.º 4
0
 partial void InsertMemberSetting(MemberSetting instance);