private bool checkInput() { resetError(); bool check = true; if (!funcShare.checkPK(textbox_nv.Text, "nhan_vien")) { label_nv.Visible = true; e_nv.Visible = true; check = false; } if (!funcShare.checkPK(textbox_ncc.Text, "nha_cung_cap")) { label_ncc.Visible = true; e_ncc.Visible = true; check = false; } if (!funcShare.checkDate(textbox_ngay.Text, textbox_thang.Text, textbox_nam.Text)) { label_date.Visible = true; e_date.Visible = true; check = false; } if (gridView2.Rows.Count == 0) { label_last.Visible = true; check = false; } return(check); }
private bool checkInput() { resetError(); bool check = true; if (textbox_ten.Text == "") { e_ten.Visible = true; check = false; } if (!funcShare.checkPK(textbox_loai.Text, "loai_hang")) { label_error_loai.Visible = true; e_loai.Visible = true; check = false; } if (!funcShare.isNumber(textbox_remain.Text)) { label_error_remain.Visible = true; e_remain.Visible = true; check = false; } return(true); }