Ejemplo n.º 1
0
        private bool checkNGCode()
        {
            ServiceReference.ServiceClient client = new ServiceReference.ServiceClient();
            string jsdata = client.RunServerAPI("BLL.NGCode", "GetNGCode", ktb_NGcoude.Text);

            if (jsdata == "")
            {
                MessageBox.Show("无效的不良代码", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return(false);
            }
            return(true);
        }
Ejemplo n.º 2
0
 //验证员工号
 private void text_empcode_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == (char)13 || e.KeyChar == (char)9)
     {
         ServiceReference.ServiceClient client = new ServiceReference.ServiceClient();
         string jsdata = client.RunServerAPI("BLL.Employee", "GetStaff", text_empcode.Text);
         if (jsdata == "")
         {
             MessageBox.Show("员工号不存在", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             text_empcode.Text = null;
             text_empcode.Focus();
             return;
         }
         text_empcode.ReadOnly = true;
         ktb_NGcoude.Focus();
     }
 }