示例#1
0
 private void ExCmdButton()
 {
     _dtButton = DateTime.Now;
     if (StayAtModifyView)
     {
         if (SaveModfiyInfo())
         {
             StayAtModifyView = false;
         }
     }
     else
     {
         var sss = UMessageBoxWantSomefromUser.Show("密码验证", "请输入密码", "");
         if (sss == UMessageBoxWantSomefromUser.CancelReturn)
         {
             return;
         }
         if (sss != UserInfo.UserLoginInfo.UserPassword)
         {
             UMessageBox.Show("验证失败", "您输入的密码与本用户密码不匹配,请检查......", UMessageBoxButton.Yes);
             return;
         }
         StayAtModifyView = true;
     }
 }
示例#2
0
        private void ExCmdZcOrSnd(string str)
        {
            int x = 0;

            try
            {
                x = Convert.ToInt32(str);
            }
            catch (Exception ex)
            {
            }
            _lastexutettime = DateTime.Now.Ticks;
            LastExute       = x;

            if (x < 1)
            {
                return;
            }
            if (x > 15)
            {
                return;
            }
            if (x == 1)
            {
                if (Wlst.Sr.EquipmentInfoHolding.Services.Others.OpenCloseLightSecondConfirm == 2)
                {
                    var sss = UMessageBoxWantPassWord.Show("密码验证", "请输入您的用户密码", "");
                    if (sss == UMessageBoxWantPassWord.CancelReturn)
                    {
                        return;
                    }
                    if (sss != UserInfo.UserLoginInfo.UserPassword)
                    {
                        UMessageBox.Show("验证失败", "您输入的密码与本用户密码不匹配,请检查......",
                                         UMessageBoxButton.Yes);
                        return;
                    }
                }
                else
                {
                    var sss = UMessageBoxWantSomefromUser.Show("上海五零盛同信息科技有限公司", "您将要进行开关灯操作,\r\n若确定请输入验证码:1234", "");
                    if (sss == UMessageBoxWantSomefromUser.CancelReturn)
                    {
                        return;
                    }

                    if (sss != "1234")
                    {
                        UMessageBox.Show("验证失败", "您输入的验证码与默认值不匹配,请检查......", UMessageBoxButton.Yes);
                        return;
                    }
                }
                //var sss = UMessageBoxWantSomefromUser.Show("输入验证码", "您将要进行开关灯操作,\r\n若确认请输入验证码:1234", "");
                //if (sss == UMessageBoxWantSomefromUser.CancelReturn)
                //{
                //    return;
                //}
                //if (sss != "1234")
                //{
                //    UMessageBox.Show("验证失败", "您输入的验证码与默认值不匹配,请检查......", UMessageBoxButton.Yes);
                //    return;
                //}
            }
            if (x == 4)
            {
                if (Wlst.Sr.EquipmentInfoHolding.Services.Others.OpenCloseLightSecondConfirm == 2)
                {
                    var sss = UMessageBoxWantPassWord.Show("密码验证", "请输入您的用户密码", "");
                    if (sss == UMessageBoxWantPassWord.CancelReturn)
                    {
                        return;
                    }
                    if (sss != UserInfo.UserLoginInfo.UserPassword)
                    {
                        UMessageBox.Show("验证失败", "您输入的密码与本用户密码不匹配,请检查......",
                                         UMessageBoxButton.Yes);
                        return;
                    }
                }
                else
                {
                    var sss = UMessageBoxWantSomefromUser.Show("上海五零盛同信息科技有限公司", "您将要进行开关灯操作,\r\n若确定请输入验证码:1234", "");
                    if (sss == UMessageBoxWantSomefromUser.CancelReturn)
                    {
                        return;
                    }

                    if (sss != "1234")
                    {
                        UMessageBox.Show("验证失败", "您输入的验证码与默认值不匹配,请检查......", UMessageBoxButton.Yes);
                        return;
                    }
                }
                //var sss = UMessageBoxWantSomefromUser.Show("输入验证码", "您将要进行开关灯操作,\r\n若确认请输入验证码:1234", "");
                //if (sss == UMessageBoxWantSomefromUser.CancelReturn)
                //{
                //    return;
                //}
                //if (sss != "1234")
                //{
                //    UMessageBox.Show("验证失败", "您输入的验证码与默认值不匹配,请检查......", UMessageBoxButton.Yes);
                //    return;
                //}
            }
            SndCmdOrders(x);
        }