Exemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack)
     {
         return;
     }
     ReDisplayTableSource(actionInfoBLL.SelectALL(false));
     TEXTBOX_AddBeginTime.Value = DateTime.Now.AddDays(1).ToString("yyyy/MM/dd");
     TEXTBOX_AddEndTime.Value   = DateTime.Now.AddMonths(1).ToString("yyyy/MM/dd");
 }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsCallback)
            {
                return;
            }
            if (Request.Cookies["UserCode"] == null || Request.Cookies["UserPassword"] == null)
            {
                Request.Cookies.Add(new HttpCookie("UserCode"));
                Request.Cookies.Add(new HttpCookie("UserPassword"));
            }
            String UserCode     = Request.Cookies["UserCode"].Value;
            String UserPassword = Request.Cookies["UserPassword"].Value;

            if (UserPassword == null || UserPassword == "")
            {
                //未登陆
                BUTTON_UserName.Value = "未登陆";
                LABEL_Rank.Text       = "";
            }
            else
            {
                UsersModel model = userBLL.ToModel(userBLL.LoginByUserCodePasswordReturnModel(UserCode, UserPassword))[0];
                //已经登录
                BUTTON_UserName.Value = model.UName;
                //LABEL_Rank.Text = "排名---1";
            }
            if (IsPostBack)
            {
                return;
            }
            List <ActionInfoModel> OldactionInfoModels = actionInfoBLL.ToModel(actionInfoBLL.SelectALL());
            List <ActionInfoModel> NewactionInfoModels = new List <ActionInfoModel>();

            foreach (ActionInfoModel model in OldactionInfoModels)
            {
                model.AName = (model.AName + "-----------开始时间:" + model.ABeginTime + "-----------结束时间:" + model.AEndTime).Replace("00:00:00", "");
                NewactionInfoModels.Add(model);
            }
            DROPDOWNLIST_ActionSelect.DataSource     = NewactionInfoModels;
            DROPDOWNLIST_ActionSelect.DataValueField = "AID";
            DROPDOWNLIST_ActionSelect.DataTextField  = "AName";
            DROPDOWNLIST_ActionSelect.DataBind();
            int AID = Convert.ToInt32(NotNullRequest("AID", 0));

            if (AID != 0)
            {
                DROPDOWNLIST_ActionSelect.SelectedValue = AID.ToString();
            }
            ReRoteUsersInfoRepeaterSourceByPage();
        }
Exemplo n.º 3
0
        public void DropDownListSourceBindingToActionList(DropDownList DROPDOWNLIST_ActionSelect)
        {
            List <ActionInfoModel> OldactionInfoModels = actionInfoBLL.ToModel(actionInfoBLL.SelectALL());
            List <ActionInfoModel> NewactionInfoModels = new List <ActionInfoModel>();

            foreach (ActionInfoModel model in OldactionInfoModels)
            {
                model.AName = (model.AName + "-----------开始时间:" + model.ABeginTime + "-----------结束时间:" + model.AEndTime).Replace("00:00:00", "");
                NewactionInfoModels.Add(model);
            }
            DROPDOWNLIST_ActionSelect.DataSource     = NewactionInfoModels;
            DROPDOWNLIST_ActionSelect.DataValueField = "AID";
            DROPDOWNLIST_ActionSelect.DataTextField  = "AName";
            DROPDOWNLIST_ActionSelect.DataBind();
        }
Exemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                return;
            }

            List <ActionInfoModel> OldactionInfoModels = actionInfoBLL.ToModel(actionInfoBLL.SelectALL());
            List <ActionInfoModel> NewactionInfoModels = new List <ActionInfoModel>();

            foreach (ActionInfoModel model in OldactionInfoModels)
            {
                model.AName = (model.AName + "-----------开始时间:" + model.ABeginTime + "-----------结束时间:" + model.AEndTime).Replace("00:00:00", "");
                NewactionInfoModels.Add(model);
            }
            DROPDOWNLIST_ActionSelect.DataSource     = NewactionInfoModels;
            DROPDOWNLIST_ActionSelect.DataValueField = "AID";
            DROPDOWNLIST_ActionSelect.DataTextField  = "AName";
            DROPDOWNLIST_ActionSelect.DataBind();
        }