Exemple #1
0
        public static void Update(StdTypeVM item)
        {
            StdType dbItem = GetSingleById(item.Id);

            dbItem.UpdateStandardType(item);
            RepositoryBase <StdType> .Update(dbItem);

            RepositoryBase <StdType> .SaveChanges();
        }
Exemple #2
0
        public static StdType Add(StdTypeVM item)
        {
            StdType dbItem = new StdType();

            dbItem.UpdateStandardType(item);

            dbItem.Id      = item.Id;
            dbItem.Actived = item.Actived;

            dbItem.CreatedDate = DateTime.Now;
            dbItem.CreatedBy   = HttpContext.Current.User.Identity.Name;

            StdType model = RepositoryBase <StdType> .Add(dbItem);

            RepositoryBase <StdType> .SaveChanges();

            return(dbItem);
        }