Httphost.ServicesForQX qx = new Httphost.ServicesForQX();
qx.Url = System.Configuration.ConfigurationManager.AppSettings["Httphost.ServicesForQX"];
DataSet ds = qx.GetUserInfo(minyh, minmp, System.Configuration.ConfigurationManager.AppSettings["projectid"].ToString());//调用WebService的一个方法
if (ds != null)
{
QXUsersVO qxUser = newQXUsersVO();
qxUser.FID = Convert.ToInt16(ds.Tables[0].Rows[0]["FID"].ToString());
qxUser.FDEL = ds.Tables[0].Rows[0]["FDEL"].ToString();
qxUser.FSYS = ds.Tables[0].Rows[0]["FSYS"].ToString();
qxUser.CARD_CODE = ds.Tables[0].Rows[0]["CARD_CODE"].ToString();
qxUser.USER_CODE = ds.Tables[0].Rows[0]["USER_CODE"].ToString();
qxUser.USER_NAME = ds.Tables[0].Rows[0]["USER_NAME"].ToString();
qxUser.USER_PSWD = ds.Tables[0].Rows[0]["USER_PSWD"].ToString();
qxUser.USER_TYPE = ds.Tables[0].Rows[0]["USER_TYPE"].ToString();
qxUser.COMP_CODE = ds.Tables[0].Rows[0]["COMP_CODE"].ToString();
qxUser.COMP_NAME = ds.Tables[0].Rows[0]["COMP_NAME"].ToString();
qxUser.DEPT_CODE = ds.Tables[0].Rows[0]["DEPT_CODE"].ToString();
qxUser.DEPT_NAME = ds.Tables[0].Rows[0]["DEPT_NAME"].ToString();
qxUser.GRP_CODE = ds.Tables[0].Rows[0]["GRP_CODE"].ToString();
qxUser.GRP_NAME = ds.Tables[0].Rows[0]["GRP_NAME"].ToString();
qxUser.OTHER_GRPS = ds.Tables[0].Rows[0]["OTHER_GRPS"].ToString();
qxUser.FUNC_PWR = ds.Tables[0].Rows[0]["FUNC_PWR"].ToString();
qxUser.DATA_PWR = ds.Tables[0].Rows[0]["DATA_PWR"].ToString();
qxUser.OTHER_PWR = ds.Tables[0].Rows[0]["OTHER_PWR"].ToString();
Session["qxuser"] = qxUser; //将用户对象放入Session
string urlstr = "";
if(qxUser.USER_NAME=="admin")
urlstr = "Admin/AppFrames/adminConfig.aspx";
else
urlstr = "Admin/aspx/MainFrame_GK.aspx";
Response.Redirect(urlstr);
}
else
{
string scri = ""; scri = "<script language ='javascript'> alert(\"用户名或密码不存在!\"); </script>";
ClientScript.RegisterStartupScript(this.GetType(), "alert1", scri);
}