private void but_register_Click(object sender, EventArgs e) { if (kiemTraInput()) { c1 = label_id.Text; c2 = funcShare.Nvarchar(tbTen.Text); c3 = funcShare.Nvarchar(cbMaNhanVien.SelectedValue.ToString()); funcShare.insert("quay", "id, ten,nhan_vien_id", c1, c2, c3); funcShare.loadGridView("quay", dataGridView2); funcShare.autoID(label_id, "quay"); resetRegister(); } }
private void but_register_Click(object sender, EventArgs e) { if (checkInput()) { c1 = label_id.Text; c2 = funcShare.Nvarchar(textbox_ten.Text); c3 = textbox_loai.Text; c4 = textbox_remain.Text; funcShare.insert("mat_hang", "id, ten,loai_hang_id, remain", c1, c2, c3, c4); LoadMatHang(); funcShare.autoID(label_id, "mat_hang"); clear(); } }
private void but_register_Click(object sender, EventArgs e) { if (kiemTraInput()) { c1 = label_id.Text; c2 = funcShare.Nvarchar(textbox_ten.Text); c3 = funcShare.Nvarchar(textbox_sdt.Text); c4 = funcShare.Nvarchar(textbox_quan.Text); c5 = funcShare.Nvarchar(textbox_phuong.Text); c6 = funcShare.Nvarchar(textbox_city.Text); funcShare.insert("nha_cung_cap", "id, ten, sdt, quan, phuong, city", c1, c2, c3, c4, c5, c6); funcShare.loadGridView("nha_cung_cap", gridView); funcShare.autoID(label_id, "nha_cung_cap"); resetRegister(); } }
private void but_register_Click(object sender, EventArgs e) { if (checkInput()) { c1 = label_id.Text; c2 = textbox_ncc.Text; c3 = funcShare.date(textbox_ngay.Text, textbox_thang.Text, textbox_nam.Text); c4 = textbox_nv.Text; funcShare.insert("phieu_nhap", "id,ncc_id,ngay_nhap,nhan_vien_id", c1, c2, c3, c4); for (int i = 0; i < gridView2.Rows.Count; i++) { c2 = gridView2.Rows[i].Cells[0].Value.ToString(); c3 = gridView2.Rows[i].Cells[1].Value.ToString(); c4 = gridView2.Rows[i].Cells[2].Value.ToString(); c5 = funcShare.Nvarchar(gridView2.Rows[i].Cells[3].Value.ToString()); funcShare.insertNoIdentity("chi_tiet_phieu_nhap", "phieu_nhap_id,mat_hang_id,so_luong,don_gia,don_vi", c1, c2, c3, c4, c5); } LoadPhieuNhap(); clear(); funcShare.autoID(label_id, "phieu_nhap"); } }