Esempio n. 1
0
        public void HotelPhotoCategoryDelete(int PhotoCategoryId)
        {
            Htl_HotelPhotoCategories result = ent.Htl_HotelPhotoCategories.Where(x => x.PhotoCategoryId == PhotoCategoryId).FirstOrDefault();

            ent.DeleteObject(result);
            ent.SaveChanges();
        }
Esempio n. 2
0
        public void HotelPhotoCategoryEdit(HotelPhotoCategories model)
        {
            Htl_HotelPhotoCategories result = ent.Htl_HotelPhotoCategories.Where(x => x.PhotoCategoryId == model.PhotoCategoryId).FirstOrDefault();

            result.PhotoCategoryId = model.PhotoCategoryId;
            result.CategoryName    = model.CategoryName;
            result.Details         = model.Details;
            result.HotelId         = model.HotelId;
            result.isActive        = model.isActive;
            result.UpdatedBy       = App_Class.AppSession.LogUserID;
            result.UpdatedDate     = DateTime.Now;

            ent.ApplyCurrentValues(result.EntityKey.EntitySetName, result);
            ent.SaveChanges();
        }
Esempio n. 3
0
        public void HotelPhotoCategoryAdd(HotelPhotoCategories model)
        {
            Htl_HotelPhotoCategories obj = new Htl_HotelPhotoCategories
            {
                CategoryName = model.CategoryName,
                Details      = model.Details,
                HotelId      = model.HotelId,
                isActive     = model.isActive,
                CreatedBy    = App_Class.AppSession.LogUserID,
                CreatedDate  = DateTime.Now,
            };

            ent.AddToHtl_HotelPhotoCategories(obj);
            ent.SaveChanges();
        }