62,046
社区成员
发帖
与我相关
我的任务
分享
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Dbhelp;
using Model;
using DAL;
namespace DealersAdmin
{
public partial class Contact : System.Web.UI.Page
{
/// <summary>
/// 个人信息采用viewstate
/// </summary>
private Jxs_Admin jxs_admin {
get {
object o = ViewState["jxs_admin"];
return o == null ? null : (Jxs_Admin)o;
}
set {
ViewState["jxs_admin"] = value;
}
}
Jxs_AadminDAL jsx_admindal = new Jxs_AadminDAL();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Session["Userid"] == null)
{
Help.Msg("请先登录在使用本功能!", "Login.aspx");
return;
}
else
{
jxs_admin = new Jxs_Admin();//这里我不实例化下面可以用吗,
jxs_admin = jsx_admindal.GetModel(Session["Userid"].ToString());
Companyname.Value = jxs_admin.Companyname;
HeadName.Value = jxs_admin.Headname;
Fax.Value = jxs_admin.Fas;
cellphone.Value = jxs_admin.Cellphone;
mailbox.Value = jxs_admin.Mailbox;
companyaddress.Value = jxs_admin.Companyaddress;
Consignee.Value = jxs_admin.Consignee;
Consigneephone.Value = jxs_admin.Consigneephone;
Consigneeaddress.Value = jxs_admin.Consigneeaddress;
beizhu.Value = jxs_admin.Beizhu;
}
}
else {
if (!string.IsNullOrEmpty(Request.QueryString["Action"]))
{
string Action = Request.QueryString["Action"].ToString();
if (Action.Equals("Update"))
{
jxs_admin.Address = jxs_admin.Address;
}
}
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace DealersAdmin
{
public partial class Coon : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void console_Click(object sender, EventArgs e)
{
Session.Remove("userid");
Dbhelp.Help.Msg("退出成功!","Login.aspx");
}
}
}