Exemple #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"];
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //Init Data
            EnumUtil.BindEnumData2ListControl <DashPageLayout>(this.rdlLayout, false);
            EnumUtil.BindEnumData2ListControl <DashPageType>(this.rdlType, false);
            EnumUtil.BindEnumData2ListControl <DashStatus>(this.rdlStatus, false);
            //Init Controls Data before do query

            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"];
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //Init Controls Data before do query
         //
         EnumUtil.BindEnumData2ListControl <UserGroupType>(this.cklGroupType, true);
         //restore query from last time
         RestoreLastQuery();
     }
 }
Exemple #4
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();
     }
 }
Exemple #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //Init Controls Data before do query
         EnumUtil.BindEnumData2ListControl <DashPageLayout>(this.cklLayout, true);
         EnumUtil.BindEnumData2ListControl <DashPageType>(this.rdlType, true);
         EnumUtil.BindEnumData2ListControl <DashStatus>(this.cklStatus, true);
         //restore query from last time
         RestoreLastQuery();
     }
 }
Exemple #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //Init Controls Data before do query
         EnumUtil.BindEnumData2ListControl <DictionaryItemType>(rdlItemType, true);
         //restore query from last time
         using (_session = new Session())
         {
             RestoreLastQuery();
         }
     }
 }
Exemple #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //Init Data
         EnumUtil.BindEnumData2ListControl <UserGroupType>(this.rblGroupType, false);
         using (_session = new Session())
         {
             _actionMode = WebUtil.GetActionMode(this);
             if (_actionMode == Mode.Edit)
             {
                 LoadData();
             }
         }
     }
     if (Request["return"] != null)
     {
         this.toolbarbottom["Return"].NavigateUrl = Request["return"];
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        _actionMode = WebUtil.GetActionMode(this);
        if (!IsPostBack)
        {
            //Init Data
            //Init Controls Data before do query
            if (_actionMode == Mode.New)
            {
                EnumUtil.BindEnumData2ListControl <DictionaryItemType>(rdlItemType, false, DictionaryItemType.Group);
                this.rdlItemType.SelectedValue = DictionaryItemType.Group.ToString();
            }
            if (_actionMode == Mode.AddChild || _actionMode == Mode.New)
            {
                EnumUtil.BindEnumData2ListControl <DictionaryItemType>(rdlItemType, false, DictionaryItemType.Boolean, DictionaryItemType.Numric, DictionaryItemType.String);
                this.rdlItemType.SelectedValue = DictionaryItemType.String.ToString();
            }


            using (_session = new Session())
            {
                this.trGroupCode.Visible = false;
                if (_actionMode == Mode.Edit)
                {
                    LoadData();
                }
                else if (_actionMode == Mode.AddChild)
                {
                    AddChild();
                }
                logger.Info("操作类型" + _actionMode.ToString());
            }
        }
        if (Request["return"] != null)
        {
            this.toolbarup["Return"].NavigateUrl     = Request["return"];
            this.toolbarbottom["Return"].NavigateUrl = Request["return"];
        }
    }
 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"];
     }
 }
    private void LoadData()
    {
        hidItemCode.Value = WebUtil.Param("itemCode");
        string itemCode = WebUtil.Param("itemCode");

        DictionaryItem dictionaryItem = null;

        dictionaryItem = DictionaryItem.Retrieve(_session, itemCode);

        if (dictionaryItem != null)
        {
            txtCode.Text      = hidItemCode.Value;
            txtCode.Enabled   = false;
            txtGroupCode.Text = dictionaryItem.GroupCode;
            txtName.Text      = dictionaryItem.Name;
            this.rdlItemType.Items.Clear();
            EnumUtil.BindEnumData2ListControl <DictionaryItemType>(this.rdlItemType, false, dictionaryItem.ItemType);
            rdlItemType.SelectedValue  = dictionaryItem.ItemType.ToString();
            txtNumberValue.Text        = Cast.String(dictionaryItem.NumberValue, "0");
            txtStringValue.Value       = dictionaryItem.StringValue;
            ddlBoolValue.SelectedValue = dictionaryItem.BoolValue.ToString();
            txtNote.Value = dictionaryItem.Note;
        }
    }