Пример #1
0
 public void DeleteObject(TTTV__TamTru model)
 {
     db.TTTV__TamTru.DeleteObject(model);
 }
Пример #2
0
 public void insertbyUser(string user, int? SelectedGiayToValue, int? SelectedLiDoValue, int? SelectedQuocTichValue, string TT_DiaChiTamTru, DateTime? TT_NgayDen, DateTime? TT_NgayDi, string TT_Room, string TT_GiayTo, string TT_LiDoKhac)
 {
     TTTV__TamTru model = new TTTV__TamTru();
     var info = db.TTTV__UserInformation.Where(e => e.Username == user);
     model.ID_Type = 2;
     model.ID_GiayTo = SelectedGiayToValue;
     model.ID_LiDo = SelectedLiDoValue;
     model.ID_QuocTich = SelectedQuocTichValue;
     model.ID_Status = 3;
     model.TT_FullName = info.Select(e => e.UserFullName).Single();
     model.TT_NgayDen = TT_NgayDen;
     model.TT_NgayDi = TT_NgayDi;
     model.TT_DiaChiThuongTru = info.Select(e => e.Address).Single();
     model.TT_DiaChiTamTru = TT_DiaChiTamTru;
     model.TT_Room = TT_Room;
     model.TT_GiayTo = TT_GiayTo;
     model.TT_LiDoKhac = TT_LiDoKhac;
     model.TaiKhoanDangKi = user;
     model.ProvinceID = info.Select(e => e.ProvinceID).Single();
     model.DistrictID = info.Select(e => e.DistrictID).Single();
     model.DetailProvinceID = info.Select(e => e.ProvinceDetailID).Single();
     db.TTTV__TamTru.AddObject(model);
     db.SaveChanges();
 }
Пример #3
0
 public void AddObject(TTTV__TamTru model)
 {
     db.TTTV__TamTru.AddObject(model);
 }
Пример #4
0
 public void insertAtPolice(int? SelectedGiayToValue, int? SelectedLiDoValue, int? SelectedQuocTichValue, int? SelectedProvinceValue, int? SelectedDistrictValue, int? SelectedDetailProvincesValue, string TT_FullName, string TT_DiaChiThuongTru, string TT_DiaChiTamTru, DateTime? TT_NgayDen, DateTime? TT_NgayDi, string TT_Room, string TT_GiayTo, string TT_LiDoKhac, string user)
 {
     TTTV__TamTru model = new TTTV__TamTru();
     model.ID_Type = 3;
     model.ID_GiayTo = SelectedGiayToValue;
     model.ID_LiDo = SelectedLiDoValue;
     model.ID_QuocTich = SelectedQuocTichValue;
     model.ID_Status = 1;
     model.TT_FullName = TT_FullName;
     model.TT_NgayDen = TT_NgayDen;
     model.TT_NgayDi = TT_NgayDi;
     model.TT_DiaChiThuongTru = TT_DiaChiThuongTru;
     model.TT_DiaChiTamTru = TT_DiaChiTamTru;
     model.TT_Room = TT_Room;
     model.TT_GiayTo = TT_GiayTo;
     model.TT_LiDoKhac = TT_LiDoKhac;
     model.TaiKhoanDangKi = user;
     model.ProvinceID = SelectedProvinceValue;
     model.DistrictID = SelectedDistrictValue;
     model.DetailProvinceID = SelectedDetailProvincesValue;
     db.TTTV__TamTru.AddObject(model);
     db.SaveChanges();
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the TTTV__TamTru EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToTTTV__TamTru(TTTV__TamTru tTTV__TamTru)
 {
     base.AddObject("TTTV__TamTru", tTTV__TamTru);
 }
 /// <summary>
 /// Create a new TTTV__TamTru object.
 /// </summary>
 /// <param name="iD_TamTru">Initial value of the ID_TamTru property.</param>
 public static TTTV__TamTru CreateTTTV__TamTru(global::System.Int32 iD_TamTru)
 {
     TTTV__TamTru tTTV__TamTru = new TTTV__TamTru();
     tTTV__TamTru.ID_TamTru = iD_TamTru;
     return tTTV__TamTru;
 }