/// <summary> /// 添加实体记录 /// </summary> /// <param name="Entity"></param> /// <returns></returns> public virtual int AddEntityData(IEntityBase Entity) { IDvTable dvt = this.EntityFact.CreateDriveTable(Entity); int i = dvt.Insert(); return(i); }
/// <summary> /// 添加权限控制项 /// </summary> /// <param name="AuthCtrl"></param> /// <returns></returns> public int AddAuthCtrl(IAuthControl AuthCtrl) { IDvTable dvt = entityfactory.CreateDriveTable(AuthCtrl); int i = dvt.Insert(); return(i); }
/// <summary> /// 添加菜单 /// </summary> /// <param name="Menu"></param> /// <returns></returns> public int AddMenu(IMenu Menu) { IDvTable dvt = entityfactory.CreateDriveTable(Menu); int i = dvt.Insert(); return(i); }
/// <summary> /// 添加角色 /// </summary> /// <param name="Role"></param> /// <returns></returns> public int AddRole(IRole Role) { IDvTable dvt = entityfactory.CreateDriveTable(Role); int i = dvt.Insert(); return(i); }
/// <summary> /// 添加单位 /// </summary> /// <param name="Units"></param> /// <returns></returns> public int AddUnits(IUnits Units) { IDvTable dvt = entityfactory.CreateDriveTable(Units); int i = dvt.Insert(); return(i); }
/// <summary> /// 添加用户 /// </summary> /// <param name="NewUser"></param> /// <returns></returns> public virtual int AddUser(IUser NewUser) { IDvTable dvt = entityfactory.CreateDriveTable(NewUser); int i = dvt.Insert(); return(i); }
/// <summary> /// 添加权限项 /// </summary> /// <param name="AuthItem"></param> /// <returns></returns> public virtual int AddAuthItem(IAuthItem AuthItem) { IDvTable dvt = entityfactory.CreateDriveTable(AuthItem); int i = dvt.Insert(); return(i); }
/// <summary> /// 保存日志对象实例 /// </summary> protected virtual void SaveLog(object Message, LogType Type) { DataHelper dh = new DataHelper(); ILog log = this.entityfactory.CreateEntityInstance <ILog>(); log.LOGCODE = (dh.GetMaxField(log, "LOGCODE", this.entityfactory) + 1); log.LOGTIME = DateTime.Now; log.CONTENT = Message.ToString(); log.LOGTYPE = Type.ToString(); IDvTable dvt = entityfactory.CreateDriveTable(log); int i = dvt.Insert(); }