Ejemplo n.º 1
0
 private void BeforeSetup()
 {
     if (WebPortal == null)
     {
         WebPortal = new WebPortal(Settings.Default.Browser);
     }
 }
Ejemplo n.º 2
0
 public int Add(WebPortal.Model.ToChuc_GiaoVien toChuc_GiaoVien)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         dataEntities.AddToToChuc_GiaoVien(toChuc_GiaoVien);
         return dataEntities.SaveChanges();
     }
 }
Ejemplo n.º 3
0
 public int Delete(WebPortal.Model.TaiNguyen taiNguyen)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         dataEntities.DeleteObject(taiNguyen);
         return dataEntities.SaveChanges();
     }
 }
Ejemplo n.º 4
0
 public int Add(WebPortal.Model.Application application)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         dataEntities.AddToApplications(application);
         return dataEntities.SaveChanges();
     }
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Them mot ChucVu
 /// </summary>
 /// <param name="chucVu"></param>
 /// <returns>1:Thanh cong</returns>
 public int Add(WebPortal.Model.ChucVu chucVu)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         dataEntities.AddToChucVus(chucVu);
         return dataEntities.SaveChanges();
     }
 }
Ejemplo n.º 6
0
 public int Delete(WebPortal.Model.LoaiTin_Lv1 loaiTinLV1)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         dataEntities.DeleteObject(loaiTinLV1);
         return dataEntities.SaveChanges();
     }
 }
Ejemplo n.º 7
0
 public int Add(WebPortal.Model.LoaiTin_Lv1 loaiTinLV1)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         dataEntities.AddToLoaiTin_Lv1(loaiTinLV1);
         return dataEntities.SaveChanges();
     }
 }
Ejemplo n.º 8
0
 public int Add(WebPortal.Model.GiaoVien giaoVien)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         dataEntities.AddToGiaoViens(giaoVien);
         return dataEntities.SaveChanges();
     }
 }
Ejemplo n.º 9
0
 public int Delete(WebPortal.Model.TinTuc tinTuc)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         dataEntities.DeleteObject(tinTuc);
         return dataEntities.SaveChanges();
     }
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Xoa Chuc Vu
 /// </summary>
 /// <param name="chucVu"></param>
 /// <returns>1:Thanh cong</returns>
 public int Delete(WebPortal.Model.ChucVu chucVu)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         dataEntities.DeleteObject(chucVu);
         return dataEntities.SaveChanges();
     }
 }
Ejemplo n.º 11
0
 public int Add(WebPortal.Model.TaiNguyen_TinTuc taiNguyen_TinTuc)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         dataEntities.AddToTaiNguyen_TinTuc(taiNguyen_TinTuc);
         return dataEntities.SaveChanges();
     }
 }
Ejemplo n.º 12
0
 public int Add(WebPortal.Model.TaiNguyen taiNguyen)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         dataEntities.AddToTaiNguyens(taiNguyen);
         dataEntities.SaveChanges();
         return taiNguyen.IDTaiNguyen;
     }
 }
Ejemplo n.º 13
0
 public int Delete(WebPortal.Model.ToChuc toChuc)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         dataEntities.Attach(toChuc);//hue
         dataEntities.DeleteObject(toChuc);
         return dataEntities.SaveChanges();
     }
 }
Ejemplo n.º 14
0
 public int Delete(WebPortal.Model.Application application)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         dataEntities.Attach(application);
         dataEntities.DeleteObject(application);
         return dataEntities.SaveChanges();
     }
 }
Ejemplo n.º 15
0
 public int Update(WebPortal.Model.ToChuc toChuc)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         var newTC = dataEntities.ToChucs.Single(a => a.IDToChuc == toChuc.IDToChuc);
         newTC.TenTC = toChuc.TenTC;
         newTC.MoTa = toChuc.MoTa;
         return dataEntities.SaveChanges();
     }
 }
Ejemplo n.º 16
0
 public int Add(WebPortal.Model.TinTuc tinTuc)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         dataEntities.AddToTinTucs(tinTuc);
         dataEntities.SaveChanges();
         int idTinTuc= tinTuc.IDTinTuc;
         return idTinTuc;
     }
 }
Ejemplo n.º 17
0
 public int Update(WebPortal.Model.TaiNguyen taiNguyen)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         var newTN = dataEntities.TaiNguyens.Single(a => a.IDTaiNguyen == taiNguyen.IDTaiNguyen);
         newTN.TenTaiNguyen = taiNguyen.TenTaiNguyen;
         newTN.MoTa = taiNguyen.MoTa;
         newTN.Path = taiNguyen.Path;
         return dataEntities.SaveChanges();
     }
 }
        public void CnblogsSearch()
        {
            WebPortal.Find()
            .FillSearchBox(expectedValue: "Selenium")
            .ClickToSearchInnerCnblogs()

            .AssertSearchBoxEquals(expectedValue: "Selenium")
            .AssertSearchResultsContain(expectedValue: "Selenium")
            ;

            SaveScreenShot(WebDriver.Title);
        }
Ejemplo n.º 19
0
 public ActionResult WebPortal_Edit(int ID)
 {
     try
     {
         WebPortal fg = db.WebPortal.Where(x => x.ID == ID).FirstOrDefault();
         if (fg == null)
         {
             return(HttpNotFound());
         }
         else
         {
         }
         return(View(fg));
     }
     catch (Exception)
     {
         throw;
     }
 }
Ejemplo n.º 20
0
 public int Update(WebPortal.Model.TinTuc tinTuc)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         var newTT = dataEntities.TinTucs.Single(a => a.IDTinTuc == tinTuc.IDTinTuc);
         newTT.IDLoaiTin = tinTuc.IDLoaiTin;
         newTT.TenTinTuc = tinTuc.TenTinTuc;
         newTT.MoTaTinTuc = tinTuc.MoTaTinTuc;
         newTT.NoiDung = tinTuc.NoiDung;
         newTT.NgayDang = tinTuc.NgayDang;
         newTT.NguoiDang = tinTuc.NguoiDang;
         newTT.HinhAnh = tinTuc.HinhAnh;
         return dataEntities.SaveChanges();
     }
 }
Ejemplo n.º 21
0
 public int Update(WebPortal.Model.ChucVu_GiaoVien chucVu_GiaoVien)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         var newCV_GV = dataEntities.ChucVu_GiaoVien.Single(a => a.ID == chucVu_GiaoVien.ID);
         newCV_GV.IDChucVu = chucVu_GiaoVien.IDChucVu;
         newCV_GV.IDGiaoVien = chucVu_GiaoVien.IDGiaoVien;
         return dataEntities.SaveChanges();
     }
 }
Ejemplo n.º 22
0
 public int Update(WebPortal.Model.LoaiTin loaiTin)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         var newLT = dataEntities.LoaiTins.Single(a => a.IDLoaiTin == loaiTin.IDLoaiTin);
         newLT.TenLoai = loaiTin.TenLoai;
         newLT.MoTa = loaiTin.MoTa;
         newLT.LoaiTin_Lv1ID = loaiTin.LoaiTin_Lv1ID;
         return dataEntities.SaveChanges();
     }
 }
Ejemplo n.º 23
0
 public int Update(WebPortal.Model.LoaiTin_Lv1 loaiTinLV1)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         var newLT = dataEntities.LoaiTin_Lv1.Single(a => a.IDLoaiTin_Lv1 == loaiTinLV1.IDLoaiTin_Lv1);
         newLT.TenLoai = loaiTinLV1.TenLoai;
         newLT.MoTa = loaiTinLV1.MoTa;
         return dataEntities.SaveChanges();
     }
 }
Ejemplo n.º 24
0
 public int Update(WebPortal.Model.ToChuc_GiaoVien toChuc_GiaoVien)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         var newTC_GV = dataEntities.ToChuc_GiaoVien.Single(a => a.ID == toChuc_GiaoVien.ID);
         newTC_GV.IDGiaoVien = toChuc_GiaoVien.IDGiaoVien;
         newTC_GV.IDToChuc = toChuc_GiaoVien.IDToChuc;
         return dataEntities.SaveChanges();
     }
 }
Ejemplo n.º 25
0
 public int Delete(WebPortal.Model.ToChuc_GiaoVien toChuc_GiaoVien)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         dataEntities.DeleteObject(toChuc_GiaoVien);
         return dataEntities.SaveChanges();
     }
 }
 public void SetApps(RemoteApplication[] apps, WebPortal.PageModule module)
 {
     Module = module;
     BindApps(apps, false);            
 }
Ejemplo n.º 27
0
 public int Update(WebPortal.Model.Application application)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         var app = dataEntities.Applications.Single(a => a.ApplicationID == application.ApplicationID);
         app.Application_Name = application.Application_Name;
         app.Application_ToString = application.Application_ToString;
         app.Application_Image = application.Application_Image;
         app.Application_FilePath = application.Application_FilePath;
         app.Application_Description = application.Application_Description;
         app.Application_DateCreate = application.Application_DateCreate;
         app.Parent_Id = application.Parent_Id;
         app.Order = application.Order;
         app.Active = application.Active;
         return dataEntities.SaveChanges();
     }
 }
Ejemplo n.º 28
0
 private void AfterSetup()
 {
     WebPortal.CommonActions.DisposeDriver();
     WebPortal = null;
 }
Ejemplo n.º 29
0
 public int Update(WebPortal.Model.TaiNguyen_TinTuc taiNguyen_TinTuc)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         var newTN_TT = dataEntities.TaiNguyen_TinTuc.Single(a => a.ID == taiNguyen_TinTuc.ID);
         newTN_TT.IDTaiNguyen = taiNguyen_TinTuc.IDTaiNguyen;
         newTN_TT.IDTinTuc = taiNguyen_TinTuc.IDTinTuc;
         return dataEntities.SaveChanges();
     }
 }
Ejemplo n.º 30
0
 public int Update(WebPortal.Model.GiaoVien giaoVien)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         var newGV = dataEntities.GiaoViens.Single(a => a.IDGiaoVien == giaoVien.IDGiaoVien);
         newGV.HoGV = giaoVien.HoGV;
         newGV.TenGV = giaoVien.TenGV;
         newGV.Email = giaoVien.Email;
         newGV.DienThoai = giaoVien.DienThoai;
         newGV.BoMon = giaoVien.BoMon;
         newGV.NgaySinh = giaoVien.NgaySinh;
         newGV.AnhDaiDien = giaoVien.AnhDaiDien;
         newGV.DiaChi = giaoVien.DiaChi;
         newGV.Active = giaoVien.Active;
         return dataEntities.SaveChanges();
     }
 }
Ejemplo n.º 31
0
 /// <summary>
 /// Thay doi thong tin chu vu
 /// </summary>
 /// <param name="chucVu"></param>
 /// <returns>1:Thanh cong</returns>
 public int Update(WebPortal.Model.ChucVu chucVu)
 {
     using (WebPortalEntities dataEntities = new WebPortalEntities())
     {
         var newCV = dataEntities.ChucVus.Single(a => a.IDCV == chucVu.IDCV);
         newCV.TenCV = chucVu.TenCV;
         newCV.MoTa = chucVu.MoTa;
         return dataEntities.SaveChanges();
     }
 }