public void GetRoomAsync(int id) { if (id == -1) { Vlu_PhongHoc obj = new Vlu_PhongHoc(); obj.PhongID = id; obj.MaPhong = string.Empty; obj.TenPhong = string.Empty; obj.NgayTao = DateTime.Now; obj.NguoiTao = SystemConfig.UserName; List<Vlu_PhongHoc> lst = new List<Vlu_PhongHoc>(); lst.Add(obj); if (GetRoomComplete != null) GetRoomComplete(this, new EntityResultsArgs<Vlu_PhongHoc>(lst.ToArray())); } else { var query = from c in Model.GetVlu_PhongHocQuery() where c.PhongID == id select c; PerformQuery(query, GetRoomComplete, false); } }
private bool FilterVlu_PhongHoc(Vlu_PhongHoc entity) { return (entity.PhongID == this.PhongID); }
/// <summary> /// Create a new Vlu_PhongHoc object. /// </summary> /// <param name="phongID">Initial value of the PhongID property.</param> /// <param name="maPhong">Initial value of the MaPhong property.</param> /// <param name="tenPhong">Initial value of the TenPhong property.</param> /// <param name="ngayTao">Initial value of the NgayTao property.</param> /// <param name="nguoiTao">Initial value of the NguoiTao property.</param> public static Vlu_PhongHoc CreateVlu_PhongHoc(global::System.Int32 phongID, global::System.String maPhong, global::System.String tenPhong, global::System.DateTime ngayTao, global::System.String nguoiTao) { Vlu_PhongHoc vlu_PhongHoc = new Vlu_PhongHoc(); vlu_PhongHoc.PhongID = phongID; vlu_PhongHoc.MaPhong = maPhong; vlu_PhongHoc.TenPhong = tenPhong; vlu_PhongHoc.NgayTao = ngayTao; vlu_PhongHoc.NguoiTao = nguoiTao; return vlu_PhongHoc; }
/// <summary> /// Deprecated Method for adding a new object to the Vlu_PhongHoc EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToVlu_PhongHoc(Vlu_PhongHoc vlu_PhongHoc) { base.AddObject("Vlu_PhongHoc", vlu_PhongHoc); }
public override void Cleanup() { if (_modelTrain != null) { _modelTrain.GetListAuthenticationFormComplete -= new EventHandler<ComplexResultsArgs<Authentication>>(_model_GetListAuthenticationFormComplete); _modelTrain.GetListRoomComplete -= new EventHandler<EntityResultsArgs<Vlu_PhongHoc>>(_modelTrain_GetListRoomComplete); _modelTrain.DeleteRoomComplete -= new EventHandler<SubmitOperationEventArgs>(_modelTrain_DeleteRoomComplete); _modelTrain = null; } _listData = null; _selectedItem = null; if (DialogSended != null) DialogSended = null; base.Cleanup(); }
public void DeleteRoomAsync(Vlu_PhongHoc obj) { Model.Vlu_PhongHocs.Remove(obj); PerformSubmitChanged(DeleteRoomComplete); }
public void SaveRoomAsync(Vlu_PhongHoc obj) { if (obj.PhongID == -1) Model.Vlu_PhongHocs.Add(obj); PerformSubmitChanged(SaveRoomComplete); }