Esempio n. 1
0
        private void buttonX1_Click(object sender, EventArgs e)
        {
            try
            {
                var kt = (from s in db.QUANLYNDs
                          where s.TENDN == txttendn.Text.ToString()
                          select new
                {
                    s
                });
                if (kt.Count() == 0)
                {
                    QUANLYND qlnd = new QUANLYND();
                    qlnd.TENDN = txttendn.Text.ToString();
                    qlnd.MK    = txtmk.Text.ToString();
                    if (rdb_hd.Checked == true)
                    {
                        qlnd.HOATDONG = Convert.ToBoolean(true);
                    }
                    else
                    {
                        if (rdb_khd.Checked == true)
                        {
                            qlnd.HOATDONG = Convert.ToBoolean(false);
                        }
                    }
                    db.QUANLYNDs.InsertOnSubmit(qlnd);
                    db.SubmitChanges();

                    us_TaiKhoanNV_Load(sender, e);
                    MessageBox.Show("thành công");
                }
            }
            catch
            {
                MessageBox.Show("Lỗi hệ thống");
            }
        }
Esempio n. 2
0
 partial void DeleteQUANLYND(QUANLYND instance);
Esempio n. 3
0
 partial void UpdateQUANLYND(QUANLYND instance);
Esempio n. 4
0
 partial void InsertQUANLYND(QUANLYND instance);