You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.1 KiB
C#

2 months ago
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace ERPOMS
{
public class PagesNew : System.Web.UI.Page
{
public PagesNew()
{
//base.Init += new EventHandler(Pages_Init);
base.Load += new EventHandler(Pages_Load);
}
void Pages_Load(object sender, EventArgs e)
{
}
public static void Login(System.Web.SessionState.HttpSessionState Session)
{
if (Session["UserId"] == null) throw new Exception("Session丢失");
}
public static UserModel Login2(System.Web.SessionState.HttpSessionState Session)
{
if (Session["Login_UserModel"] == null) throw new Exception("Session丢失");
return (UserModel)Session["Login_UserModel"];
}
public static bool IsNatural_Number(string str)
{
System.Text.RegularExpressions.Regex reg1 = new System.Text.RegularExpressions.Regex(@".*?[\u4E00-\u9FFF]+.*");
return reg1.IsMatch(str);
}
}
}