private void Sc_Competition_CodeKeyDownEvent(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { if (!string.IsNullOrEmpty(Sc_Competition.TxtCode.Text)) { mmpe.Key = Sc_Competition.TxtCode.Text; mmpe.ID = "202"; DataTable dtCompetition = new DataTable(); dtCompetition = tzkbl.M_Multiporpose_CharSelect(mmpe); if (dtCompetition.Rows.Count == 0) { tzkbl.ShowMessage("E101"); Sc_Competition.SetFocus(1); } else { Sc_Competition.LabelText = dtCompetition.Rows[0]["Char1"].ToString(); } } } }
public bool ErrorCheck() { if (String.IsNullOrWhiteSpace(txtTargetDays.Text)) { tzkbl.ShowMessage("E102"); txtTargetDays.Focus(); return(false); } if (!string.IsNullOrEmpty(Sc_Maker.TxtCode.Text)) { if (!Sc_Maker.IsExists(2)) { tzkbl.ShowMessage("E101"); Sc_Maker.SetFocus(1); return(false); } } if (!string.IsNullOrEmpty(Sc_Competition.TxtCode.Text)) { mmpe.Key = Sc_Competition.TxtCode.Text; mmpe.ID = "202"; DataTable dtCompetition = new DataTable(); dtCompetition = tzkbl.M_Multiporpose_CharSelect(mmpe); if (dtCompetition.Rows.Count == 0) { tzkbl.ShowMessage("E101"); Sc_Competition.SetFocus(1); return(false); } else { Sc_Competition.LabelText = dtCompetition.Rows[0]["Char1"].ToString(); } } if (rdoItem.Checked) { if (string.IsNullOrWhiteSpace(txtItem.Text)) { tzkbl.ShowMessage("E102"); txtItem.Focus(); return(false); } else { } } if (rdoProductCD.Checked) { if (string.IsNullOrWhiteSpace(txtManufactureCD.Text)) { tzkbl.ShowMessage("E102"); txtManufactureCD.Focus(); return(false); } } return(true); }