예제 #1
0
 public void Delete(modelRole role, bool reload = true)
 {
     db.Delete("tblRole", "ID", role);
     if (reload)
     {
         LoadRoles();
     }
 }
예제 #2
0
 public void Update(modelRole role, bool reload = true)
 {
     if (role.CreatedDate.Year < 2000)
     {
         role.CreatedDate = new DateTime(2000, 1, 1);
     }
     role.UpdatedDate = DateTime.Now;
     db.Update("tblRole", "ID", role);
     if (reload)
     {
         LoadRoles();
     }
 }
예제 #3
0
 public void Insert(modelRole role, bool reload = true)
 {
     if (role.ID == 0)
     {
         role.ID          = Program.GData.LongID();
         role.CreatedDate = DateTime.Now;
         role.UpdatedDate = DateTime.Now;
     }
     db.Insert("tblRole", "ID", false, role);
     if (reload)
     {
         LoadRoles();
     }
 }