Beispiel #1
0
        public ActionResult ValidateEffectiveDate()
        {
            GetLoginInfo();
            if (Login_Info == null)
            {
                return(Content("<script>location.href='/Home'</script>"));
            }
            acpt = new DcAccept(Login_Info.User_ID, Login_Info.User_Name,
                                Login_Info.Token);
            string ProductDate   = Request.Form["ProductDate"];
            string effectiveDate = Request.Form["EffectiveDate"];
            string shelfLife     = Request.Form["shelfLife"];
            string Barcode       = Request.Form["Barcode"];
            string OrderNO       = Request.Form["OrderNO"];

            try
            {
                acpt.SetParameter("ProductDate", ProductDate);
                acpt.SetParameter("EffectiveDate", effectiveDate);
                acpt.SetParameter("shelfLife", shelfLife);
                acpt.SetParameter("Barcode", Barcode);
                acpt.SetParameter("OrderNO", OrderNO);
                acpt.ValidateEffectiveDate();
                return(Content(""));
            }
            catch (Exception ex)
            {
                Loger.Error(ex.Message, ex);
                return(Content(ex.Message));
            }
        }
Beispiel #2
0
 private void textBox6_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         try
         {
             acpt.SetParameter("EffectiveDate", textBox6.Text.Trim());
             acpt.ValidateEffectiveDate();
             button1.Focus();
         }
         catch (RFException rfex)
         {
             MessageBox.Show(rfex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }