コード例 #1
0
 /// <summary>
 /// 用于向 tblCycle EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet&lt;T&gt; 属性的 .Add 方法。
 /// </summary>
 public void AddTotblCycle(tblCycle tblCycle)
 {
     base.AddObject("tblCycle", tblCycle);
 }
コード例 #2
0
        protected void rcomCompany_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
        {
            rcomCycle.Enabled = true;
            List<tblCycle> cycleObjList;
            GetInfo bllGetInfo = new GetInfo();

            cycleObjList = bllGetInfo.GetCycleByCompanyId(rcomCompany.SelectedItem.Value);
            if (cycleObjList != null && cycleObjList.Count>0)
            {
                rcomCycle.DataSource = cycleObjList;
                rcomCycle.DataTextField = "Cycle";
                rcomCycle.DataValueField = "Cycle";
                rcomCycle.DataBind();
            }
            else
            {
                tblCycle cycleObj = new tblCycle();
                cycleObj.Description = "N/A";
                cycleObjList.Add(cycleObj);
                rcomCycle.DataSource = cycleObjList;
                rcomCycle.DataTextField = "Description";
                rcomCycle.DataValueField = "Description";
                rcomCycle.DataBind();
                rcomCycle.Enabled = false;
            }
        }
コード例 #3
0
 /// <summary>
 /// 创建新的 tblCycle 对象。
 /// </summary>
 /// <param name="cycleID">CycleID 属性的初始值。</param>
 /// <param name="cycle">Cycle 属性的初始值。</param>
 public static tblCycle CreatetblCycle(global::System.String cycleID, global::System.Int16 cycle)
 {
     tblCycle tblCycle = new tblCycle();
     tblCycle.CycleID = cycleID;
     tblCycle.Cycle = cycle;
     return tblCycle;
 }