コード例 #1
0
 public static void Update(WF_M_USERROLE entity)
 {
     using (var db = Pub.DB)
     {
         db.Update <WF_M_USERROLE>(entity);
     }
 }
コード例 #2
0
 public static void Insert(WF_M_USERROLE entity)
 {
     using (var db = Pub.DB)
     {
         db.Insert <WF_M_USERROLE>(entity);
     }
 }
コード例 #3
0
        public static void Create(string UserId, string RoleId, string currentUserName)
        {
            using (var db = Pub.DB)
            {
                if (IsUserInRole(UserId, RoleId))
                {
                    return;
                }

                var entity = new WF_M_USERROLE();
                entity.UserRoleId     = Guid.NewGuid().ToString();
                entity.UserId         = UserId;
                entity.RoleId         = RoleId;
                entity.CreateTime     = DateTime.Now;
                entity.CreateUser     = currentUserName;
                entity.LastModifyTime = DateTime.Now;
                entity.LastModifyUser = currentUserName;
                db.Insert <WF_M_USERROLE>(entity);
            }
        }