Beispiel #1
0
        //todo this method will check upccode   and also set current upc to session ;if invalid block user for an hour
        public dynamic CheckUpcVerification(string Code, int Atempt, string sessionid)
        {
            try
            {
                dynamic Data = dal.CheckUpcVerification(Code, Atempt, sessionid);
                //if greater then zer
                if (int.Parse(Data[0]) == 1)
                {
                    if (Atempt > 3)
                    {
                        return(shared.returnMessageJSON(Messages.UPCErrorTitle, Messages.UPCErrorDescription, false));
                    }
                    NewspaperSBTSession.Upcode = Data.ToString();
                    return(shared.returnMessageJSON(Messages.UPCErrorTitle, Messages.UPCErrorDescription, false));
                }

                return(shared.returnMessageJSON(Messages.UPCErrorTitle, Messages.UPCErrorDescription, true));
            }
            catch (Exception e) {
                return(shared.returnMessageJSON(Messages.UPCErrorTitle, Messages.UPCErrorDescription, true));
            }
        }