Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
 private bool FilterVlu_PhongHoc(Vlu_PhongHoc entity)
 {
     return (entity.PhongID == this.PhongID);
 }
Exemplo n.º 3
0
 /// <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;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Vlu_PhongHoc EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToVlu_PhongHoc(Vlu_PhongHoc vlu_PhongHoc)
 {
     base.AddObject("Vlu_PhongHoc", vlu_PhongHoc);
 }
Exemplo n.º 5
0
 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();
 }
Exemplo n.º 6
0
 public void DeleteRoomAsync(Vlu_PhongHoc obj)
 {
     Model.Vlu_PhongHocs.Remove(obj);
     PerformSubmitChanged(DeleteRoomComplete);
 }
Exemplo n.º 7
0
 public void SaveRoomAsync(Vlu_PhongHoc obj)
 {
     if (obj.PhongID == -1)
         Model.Vlu_PhongHocs.Add(obj);
     PerformSubmitChanged(SaveRoomComplete);
 }