Esempio n. 1
0
    //行绑定
    protected void Manufacturerslist_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
        {
            HiddenField hfId  = e.Item.FindControl("hfId") as HiddenField;
            HiddenField hfpwd = e.Item.FindControl("hfpwd") as HiddenField;
            LinkButton  btn   = e.Item.FindControl("del") as LinkButton;

            M_Arrive arrive = barrive.GetArriveById(DataConverter.CLng(hfId.Value));
            //if (arrive != null && arrive.Id > 0)
            //{
            //    btn.Enabled = false;
            //}
        }
    }
Esempio n. 2
0
        private void MyBind()
        {
            if (Mid > 0)
            {
                EBtnSubmit.Text   = "保存设置";
                no.Visible        = true;
                createNum.Visible = false;
                txtName.Enabled   = false;
                Magclass.Enabled  = false;
                M_Arrive avMod = avBll.GetArriveById(Mid);
                txtName.Text           = avMod.ArriveName;
                Magclass.SelectedValue = avMod.Type.ToString();
                txtNo.Text             = avMod.ArriveNO;
                txtPwd.Text            = avMod.ArrivePwd;
                EditecodType.Style.Add("display", "none");

                minAmount_T.Text = avMod.MinAmount.ToString();
                maxAmount_T.Text = avMod.MaxAmount.ToString();
                Amount_T.Text    = avMod.Amount.ToString();
                Amount_T.Enabled = avMod.State == 0;
                AgainTime_T.Text = avMod.AgainTime.ToString();
                EndTime_T.Text   = avMod.EndTime.ToString();
                txtState.Text    = "未激活";
                if (avMod.State > 0)
                {
                    txtState.Text = avMod.State == 1 ? "已激活" : "已使用";
                }
                M_UserInfo info = buser.GetUserByUserID(avMod.UserID);
                if (!info.IsNull)
                {
                    txtUserID.Text = info.UserName;
                    hfid.Value     = avMod.UserID.ToString();
                }
                else
                {
                    txtUserID.Text = "未送出";
                }
            }
            else
            {
                createNum.Visible = true;
                no.Visible        = false;
                AgainTime_T.Text  = DateTime.Now.ToString("yyyy/MM/dd");
                EndTime_T.Text    = DateTime.Now.AddYears(1).ToString("yyyy/MM/dd");
            }
        }