public int Update(T obj)
 {
     if (obj is BaseEntitiy)
     {
         BaseEntitiy o = new BaseEntitiy();
         o.UpdateDate = DateTime.Now;
         //o.updateby TODO: extention for user
     }
     return(Save());
 }
示例#2
0
        public int Update(T obj)
        {
            if (obj is BaseEntitiy)
            {
                BaseEntitiy o   = obj as BaseEntitiy;
                DateTime    now = DateTime.Now;

                o.CreateDate = now;
                o.UpdateDate = now;
                o.UpdatedBy  = App.Common.GetCurrentUsername();
            }
            return(Save());
        }
        public int Insert(T obj)
        {
            _objectSet.Add(obj);

            if (obj is BaseEntitiy)
            {
                BaseEntitiy o = obj as BaseEntitiy;
                DateTime    d = DateTime.Now;

                o.CreateDate = d;
                //o.CreatedBy TODO: extention for user
                o.UpdateDate = d;
                //o.UpdatedBy TODO: extention for user
            }
            return(Save());
        }