示例#1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Bind();
         if (!string.IsNullOrEmpty(Request["enum"]))
         {
             string enumName = Request["enum"].Trim(new char[] { '【', '】' });
             txtName.Text = enumName;
             EnuminfoBLL   dal  = new EnuminfoBLL();
             EnumInfoModel info = dal.GetModel(enumName, SlnID.ToString());
             if (info != null)
             {
                 txtDescription.Text = info.enumDescription;
                 txtValueInfo.Text   = info.enumValueInfo;
                 AddorEditMode(true);
                 EditKey.Text = info.ID.ToString();
             }
             else
             {
                 txtName.Text = enumName;
                 AddorEditMode(false);
             }
         }
     }
 }
示例#2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         txtSlnID.Text  = SlnID.ToString();
         txtCopyID.Text = ContractID.ToString();
         Bind(SlnID);
     }
 }
示例#3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ddlAgreement.Items.Clear();
                DataSet ds = SlnID == 0 ? new AgreementBLL().GetList("", "0") : new AgreementBLL().GetList(" gameid=" + SlnID, SlnID.ToString());
                ddlAgreement.DataSource     = ds;
                ddlAgreement.DataTextField  = "Title";
                ddlAgreement.DataValueField = "AgreementID";
                ddlAgreement.DataBind();

                if (ddlAgreement.Items.Count == 0)
                {
                    ddlAgreement.Items.Add(new ListItem("无接口分类", "0"));
                }
            }
        }
示例#4
0
        /// <summary>
        /// 初始化加载
        /// </summary>
        public void Bind()
        {
            ddlAgreement.Items.Clear();
            DataSet ds = SlnID == 0 ? new AgreementBLL().GetList("", "0") : new AgreementBLL().GetList(" gameid=" + SlnID, SlnID.ToString());

            ddlAgreement.DataSource     = ds;
            ddlAgreement.DataTextField  = "Title";
            ddlAgreement.DataValueField = "AgreementID";
            ddlAgreement.DataBind();

            if (ddlAgreement.Items.Count == 0)
            {
                ddlAgreement.Items.Add(new ListItem("无接口分类", "0"));
            }
            if (!Request.QueryString["ID"].Equals(""))
            {
                int           ID    = Convert.ToInt32(Request.QueryString["ID"]);
                int           slnID = Convert.ToInt32(Request.QueryString["slnID"]);
                ContractBLL   BLL   = new ContractBLL();
                ContractModel model = new ContractModel();
                model                      = BLL.GetModel(ContractID, SlnID);
                txtDescption.Text          = model.Descption;
                ddlAgreement.SelectedValue = model.AgreementID.ToString();
            }
        }