コード例 #1
0
        private void AddNewNguoidung()
        {
            TaiKhoanDN sv = new TaiKhoanDN();

            sv.MaTS        = (txtMaNguoidung.Text);
            sv.TenDangnhap = (txtHoTen.Text);
            sv.Matkhau     = (txtMatkhau.Text);
            sv.NgaySinh    = (txtNgaySinh.Text);
            if (rbNamDK.IsChecked == true)
            {
                sv.GioiTinh = "Nam";
            }
            if (rbNuDK.IsChecked == true)
            {
                sv.GioiTinh = "Nữ";
            }

            context.TaiKhoanDNs.InsertOnSubmit(sv);
            context.SubmitChanges();
        }
コード例 #2
0
        public thi(string hoten, string dethi, string doithi)
        {
            InitializeComponent();
            _hoten1          = hoten;
            _dethi           = dethi;
            _Doithi          = doithi;
            lbHoTenTTNC.Text = _hoten1;
            txtloaide.Text   = _dethi;
            txtdoithi.Text   = _Doithi;


            DataClasses1DataContext context = new DataClasses1DataContext();
            TaiKhoanDN data = context.TaiKhoanDNs.Single(t => t.TenDangnhap == _hoten1);

            txtmathisinh.Text = data.MaTS;

            //CauHoi();
            Timer          = new DispatcherTimer();
            Timer.Interval = new TimeSpan(0, 0, 1);
            Timer.Tick    += Timer_Tick1;
            //Timer.Start();
        }
コード例 #3
0
        private void Update()
        {
            TaiKhoanDN sv = context.TaiKhoanDNs.Single(item => item.MaTS == (txtMaNguoidung.Text));

            if (sv.MaTS != txtMaNguoidung.Text)
            {
                MessageBox.Show("Không được sửa Mã Người Dùng");
            }
            sv.TenDangnhap = (txtHoTen.Text);
            sv.Matkhau     = (txtMatkhau.Text);
            sv.NgaySinh    = (txtNgaySinh.Text);
            if (rbNamDK.IsChecked == true)
            {
                sv.GioiTinh = "Nam";
            }
            if (rbNuDK.IsChecked == true)
            {
                sv.GioiTinh = "Nữ";
            }
            sv.Quyen = (txtquyen.Text);

            context.SubmitChanges();
        }
コード例 #4
0
 private void data1()
 {
     DataClasses1DataContext context = new DataClasses1DataContext();
     TaiKhoanDN data = context.TaiKhoanDNs.Single(t => t.TenDangnhap == _hoten);
 }
コード例 #5
0
 partial void DeleteTaiKhoanDN(TaiKhoanDN instance);
コード例 #6
0
 partial void UpdateTaiKhoanDN(TaiKhoanDN instance);
コード例 #7
0
 partial void InsertTaiKhoanDN(TaiKhoanDN instance);