/// <summary> /// 用于向 tblCycle EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet<T> 属性的 .Add 方法。 /// </summary> public void AddTotblCycle(tblCycle tblCycle) { base.AddObject("tblCycle", tblCycle); }
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; } }
/// <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; }