예제 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //Init Data
            //Init Controls Data before do query
            EnumUtil.BindEnumData2ListControl <MessageAccessibility>(rdlAccessibility, false);
            EnumUtil.BindEnumData2ListControl <MessageStatus>(rdlStatus, false);

            using (_session = new Session())
            {
                this.ddlMsgTypeId.Items.Add("");
                EnumUtil.BindEntity2ListControl <MessageType>(_session, this.ddlMsgTypeId, "TypeName", "MsgTypeId");

                this.txtCreateTime.Text = RenderUtil.FormatDatetime(DateTime.Now);
                this.txtSendTime.Text   = this.txtCreateTime.Text;
                this.txtCreateBy.Text   = SecuritySession.CurrentUser.UserName;

                _actionMode = WebUtil.GetActionMode(this);
                if (_actionMode == Mode.Edit)
                {
                    LoadData();
                }
            }
        }
        if (Request["return"] != null)
        {
            this.toolbarup["Return"].NavigateUrl     = Request["return"];
            this.toolbarbottom["Return"].NavigateUrl = Request["return"];
        }
    }
예제 #2
0
    private void ChangeMsgTypeId(ISession session)
    {
        this.ddlTmplCode.Items.Clear();
        int msgtypeId = -1;

        if (int.TryParse(this.ddlMsgTypeId.SelectedValue, out msgtypeId))
        {
            EnumUtil.BindEntity2ListControl <MsgTemplate>(session, this.ddlTmplCode, "Name", "TmplCode", Exp.Eq("MsgTypeId", msgtypeId));
        }
    }
예제 #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //Init Controls Data before do query
         EnumUtil.BindEnumData2ListControl <MessageAccessibility>(cklAccessibility, true);
         this.ddlMsgType.Items.Add("");
         EnumUtil.BindEntity2ListControl <MessageType>(this.ddlMsgType, "TypeName", "MsgTypeId");
         //restore query from last time
         RestoreLastQuery();
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //Init Data
         EnumUtil.BindEnumData2ListControl <MessageAccessibility>(rdlAccessibility, false);
         EnumUtil.BindEntity2ListControl <MessageType>(this.ddlMsgType, "TypeName", "MsgTypeId");
         using (_session = new Session())
         {
             _actionMode = WebUtil.GetActionMode(this);
             if (_actionMode == Mode.Edit)
             {
                 LoadData();
             }
         }
     }
     if (Request["return"] != null)
     {
         this.toolbarup["Return"].NavigateUrl     = Request["return"];
         this.toolbarbottom["Return"].NavigateUrl = Request["return"];
     }
 }