Пример #1
0
        private void button5_Click(object sender, EventArgs e)
        {
            Model.Message message = new Model.Message();
            message.Name  = sName.Text; message.Id = label5.Text;
            message.Sex   = Sex.Text; message.Phone = Phone.Text;
            message.Major = Major.Text; message.Grade = Grade.Text;
            message.Email = Email.Text; message.College = College.Text;
            message.Class = Class.Text; message.Introduction = Intro.Text;
            BLL.Message b_mess = new BLL.Message();
            string      msg    = "";

            if (b_mess.InsertMessage(message, out msg))
            {
                MessageBox.Show(msg);
            }
        }
Пример #2
0
        private void button4_Click(object sender, EventArgs e)
        {
            MODEL.Message message = new MODEL.Message();
            message.Name   = sName.Text; message.Id = label5.Text;
            message.Sex    = Sex.Text; message.Phone = Phone.Text;
            message.Major  = Major.Text; message.Grade = Grade.Text;
            message.Email  = Email.Text; message.College = College.Text;
            message.Number = int.Parse(Number.Text.ToString()); message.Gudiance = Guidance.Text;
            message.Psd    = pwd.Text; message.Title = Title.Text;
            BLL.Message b_mess = new BLL.Message();
            string      msg    = "";

            if (b_mess.InsertMessage(message, out msg))
            {
                MessageBox.Show(msg);
            }
        }