示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            NhanvienDataContext db = new NhanvienDataContext();
            NHANVIEN            dv = new NHANVIEN();

            dv.MANV      = Convert.ToInt32(textBox1.Text);
            dv.HOTEN     = textBox2.Text;
            dv.NGAYSINH  = textBox3.Text;
            dv.DIACHI    = textBox4.Text;
            dv.DIENTHOAI = textBox5.Text;
            dv.HSLUONG   = Convert.ToDouble(textBox6.Text);
            dv.MADONVI   = Convert.ToInt32(comboBox1.Text);
            db.NHANVIENs.InsertOnSubmit(dv);
            db.SubmitChanges();
            load();
        }
示例#2
0
        private void button2_Click(object sender, EventArgs e)
        {
            int dongchon           = dataGridView1.CurrentCell.RowIndex;
            NhanvienDataContext db = new NhanvienDataContext();
            NHANVIEN            q  = db.NHANVIENs.Single(p => p.MANV == Convert.ToInt32(textBox1.Text));

            q.MANV      = Convert.ToInt32(textBox1.Text);
            q.HOTEN     = textBox2.Text;
            q.NGAYSINH  = textBox3.Text;
            q.DIACHI    = textBox4.Text;
            q.DIENTHOAI = textBox5.Text;
            q.HSLUONG   = Convert.ToDouble(textBox6.Text);
            q.MADONVI   = Convert.ToInt32(comboBox1.Text);
            db.SubmitChanges();
            load();
        }
示例#3
0
 private void detach_NHANVIENs(NHANVIEN entity)
 {
     this.SendPropertyChanging();
     entity.DONVI = null;
 }
示例#4
0
 private void attach_NHANVIENs(NHANVIEN entity)
 {
     this.SendPropertyChanging();
     entity.DONVI = this;
 }
示例#5
0
 partial void DeleteNHANVIEN(NHANVIEN instance);
示例#6
0
 partial void UpdateNHANVIEN(NHANVIEN instance);
示例#7
0
 partial void InsertNHANVIEN(NHANVIEN instance);