コード例 #1
0
        protected void BindingCombox()
        {
            List<tblCompany> companyObjList;
            GetInfo bllGetInfo = new GetInfo();
            companyObjList=bllGetInfo.GetCompany();
            if (companyObjList != null && companyObjList.Count>0)
            {
                tblCompany companyObj = new tblCompany();
                companyObj.CompName = "N/A";
                companyObj.CompanyID = "N/A";
                companyObjList.Add(companyObj);
                rcomCompany.DataSource = companyObjList;
                rcomCompany.DataTextField = "CompName";
                rcomCompany.DataValueField = "CompanyID";
                rcomCompany.DataBind();

                rcomCompany.SelectedValue = "N/A";
            }
        }
コード例 #2
0
 /// <summary>
 /// 用于向 tblCompany EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet&lt;T&gt; 属性的 .Add 方法。
 /// </summary>
 public void AddTotblCompany(tblCompany tblCompany)
 {
     base.AddObject("tblCompany", tblCompany);
 }
コード例 #3
0
 /// <summary>
 /// 创建新的 tblCompany 对象。
 /// </summary>
 /// <param name="comp">Comp 属性的初始值。</param>
 /// <param name="companyID">CompanyID 属性的初始值。</param>
 /// <param name="compName">CompName 属性的初始值。</param>
 /// <param name="prorate">Prorate 属性的初始值。</param>
 public static tblCompany CreatetblCompany(global::System.String comp, global::System.String companyID, global::System.String compName, global::System.Boolean prorate)
 {
     tblCompany tblCompany = new tblCompany();
     tblCompany.Comp = comp;
     tblCompany.CompanyID = companyID;
     tblCompany.CompName = compName;
     tblCompany.Prorate = prorate;
     return tblCompany;
 }