Esempio n. 1
0
        public static string ValidFFZF(string strContent)
        {
            if (FinalString(strContent).Length > 0)
            {
                string[] strFFZF = SystemConfigFacade.Instance().FFZF.Split(',');
                for (int i = 0; i < strFFZF.Length; i++)
                {
                    if (strContent.IndexOf(strFFZF[i].Trim()) >= 0)
                    {
                        return(strFFZF[i]);
                    }
                }
            }

            return(string.Empty);
        }
Esempio n. 2
0
 public static bool IsUserValid(string uname, string upass)
 {
     uname = CommonMethodFacade.FinalString(uname);
     upass = CommonMethodFacade.FinalString(upass);
     if (uname.Length > 0 && upass.Length > 0)
     {
         string sqlLogin = @"UPDATE XiHuan_UserInfo SET LastLoginTime=getdate(), 
                                Score=Score+(CASE WHEN LastLoginTime<'{0}' THEN {1} ELSE 0 END ) 
                                WHERE UserName='******' AND  OrignalPwd='{3}' ;";
         int    effcount = Query.ProcessSqlNonQuery(string.Format(sqlLogin, DateTime.Now.ToString("yyyy-MM-dd"),
                                                                  SystemConfigFacade.Instance().LoginAddScore(), ValidatorHelper.SafeSql(uname),
                                                                  ValidatorHelper.SafeSql(upass)),
                                                    GlobalVar.DataBase_Name);
         return(effcount > 0);
     }
     else
     {
         return(false);
     }
 }