コード例 #1
0
ファイル: register.xaml.cs プロジェクト: LeongHouHeng/CRM
        private void SaveBtn_Click(object sender, RoutedEventArgs e)
        {
            firstName = this.FirstNameET.Text;
            lastName  = this.LastNameET.Text;
            del       = this.DelET.Text;

            DataClassesDataContext db = new DataClassesDataContext();
            mytable ot = new mytable();

            ot.first_name        = firstName;
            ot.last_name         = lastName;
            ot.phone_number      = del;
            ot.phone_number_cat  = delcombo;
            ot.adress            = "null";
            ot.describe          = "null";
            ot.email             = "null";
            ot.icon              = "null";
            ot.nick_name         = "null";
            ot.phone_number2     = "null";
            ot.phone_number2_cat = null;
            string str = lastName.Count() + del + firstName.Count();

            ot.id        = str;
            ot.displayed = 0;
            db.mytable.InsertOnSubmit(ot);
            db.SubmitChanges();
            MainWindow mw = new MainWindow();

            mw.Activate();
            mw.BeginInit();
            Hide();
            try
            {
            }catch (Exception ep)
            {
                Console.WriteLine(ep.ToString());
            }
        }
コード例 #2
0
 partial void Deletemytable(mytable instance);
コード例 #3
0
 partial void Updatemytable(mytable instance);
コード例 #4
0
 partial void Insertmytable(mytable instance);