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.

60 lines
2.1 KiB
C#

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using DSWeb.Models;
using DSWeb.EntityDA;
namespace DSWeb.Message
{
public partial class MessageSetting : System.Web.UI.Page
{
private string strUserID;//用户GID
protected void Page_Load(object sender, EventArgs e)
{
if (Session["USERID"] != null)
{
strUserID = Session["USERID"].ToString();
this.h_userid.Value = strUserID;
}
if (strUserID != null)
{
UserMessageSettingDA userMessageSettingDA = new UserMessageSettingDA();
UserMessageSettingEntity userMessageSettingEntity = userMessageSettingDA.GetUserMsgSettingByUserID(strUserID);
if (userMessageSettingEntity != null)
{
if (userMessageSettingEntity.GID != null)
{
this.h_interval.Value = userMessageSettingEntity.MessageInterVal.ToString();
this.txt_interval.Value = userMessageSettingEntity.MessageInterVal.ToString();
this.txt_interval.Disabled = false;
this.ck_interval.Checked = true;
this.ck_sys.Checked = userMessageSettingEntity.IsReadSystem;
this.ck_apply.Checked = userMessageSettingEntity.IsReadApply;
this.ck_audit.Checked = userMessageSettingEntity.IsReadAudit;
}
else
{
this.txt_interval.Disabled = true;
this.txt_interval.Value = "1";
}
}
else
{
this.txt_interval.Disabled = true;
this.txt_interval.Value = "1";
}
}
}
}
}