示例#1
0
        private void btnthem_Click(object sender, EventArgs e)
        {
            const string masanpham = "";
            var          db        = new MyDBContextDataContext();
            var          lst       = (from s in db.tbDonSanXuats where s.SCD == sCDLabel1.Text select s).Single();
            var          frm       = new frmDonSanXuat_Them(lst.SCD, masanpham, nvObj); //, nvObj.Tennhanvien, nvObj.Taikhoan, nvObj.Matkhau, nvObj.Ngaysinh, nvObj.Gioitinh, nvObj.Diachi, nvObj.Dienthoai, nvObj.Bophan, nvObj.Chucvu, nvObj.Tinhtrang, nvObj.Ghichu);

            frm.ShowDialog();
            frmDonSanXuat_Load(sender, e);
        }
示例#2
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            var scd = "0";

            try
            {
                var db  = new MyDBContextDataContext();
                var lst = (from s in db.tbDanhSachSanPhams where s.MaSanPham == maSanPhamTextEdit.Text select s).Single();
                var frm = new frmDonSanXuat_Them(scd, lst.MaSanPham, nvObj);// manhanvien, tennhanvien, taikhoan, matkhau, ngaysinh, gioitinh, diachi, dienthoai, bophan, chucvu, tinhtrang, ghichu);
                frm.ShowDialog();
            }
            catch
            {
                // ignored
            }

            frmDanhSachSanPham_Load(sender, e);
        }