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.

99 lines
3.0 KiB
C#

using System;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using System.IO;
using System.Net;
using DSWeb.Models;
using DSWeb.EntityDA;
using DSWeb.Filter;
using DSWeb.Authority;
using System.Reflection;
using DSWeb.Areas.MvcShipping.DAL.MsMainForm;
using DSWeb.Areas.MvcShipping.Models.MsMainForm;
using Microsoft.Practices.EnterpriseLibrary.Data;
using System.Data;
using System.Configuration;
namespace DSWeb
{
public partial class _Default : PageBase
{
private string strUserID;
private string strShowName;
protected void Page_Load(object sender, EventArgs e)
{
var loginUrl = ConfigurationManager.AppSettings["LoginUrl"];
if (string.IsNullOrEmpty(loginUrl))
{
loginUrl = "http://www.myshipping.net";
}
if (Session["USERID"] != null)
{
strUserID = Session["USERID"].ToString();
try
{
string sqlYuE = "select Balance from Cust_Balance where comname = (select comname from [user] where gid = '" + strUserID + "')";
Database db = DatabaseFactory.CreateDatabase();
decimal d = Convert.ToDecimal(db.ExecuteScalar(CommandType.Text, sqlYuE));
Session["YUE"] = d.ToString();
string sqlcomname = "select comname from [user] where gid='" + strUserID + "'";
string comname = Convert.ToString(db.ExecuteScalar(CommandType.Text, sqlcomname));
Session["COMNAME"] = comname;
}
catch (Exception)
{
Session["YUE"] = "0";
Session["COMNAME"] = "";
throw;
}
}
if (Session["SHOWNAME"] != null)
{
strShowName = Session["SHOWNAME"].ToString();
}
if (strUserID != null && strShowName != null)
{
if (Session["CODENAME"] != null && Session["PASS"] != null)
{
List<LoginSign> LoginInfo = MsLoginSign.GetDataList(Session["CODENAME"].ToString(), Session["PASS"].ToString());
foreach (LoginSign sign in LoginInfo)
{
//if (Session["COMPANYID"].ToString() != sign.CompanyID)
//{
// Response.Redirect("login.aspx");
//}
}
}
else
{
Response.Redirect(loginUrl);
}
}
else
{
Response.Redirect(loginUrl);
}
}
protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
string str = "";
str = "sdfsdf";
}
/// <summary>
///
}
}