public UserController(UBlink u) { lnk = u; log.Debug("createing user controller."); this.ActiveUser = null; Duc = new DC.UserCtrl(); }
public void LoadData() // load userlist from json files { try { if (lnk.Load) { log.Warn("Data already loaded."); throw new Exception("Data already loaded."); } list = new List <User>(); DC.UserCtrl DUC = new DC.UserCtrl(); foreach (DAL.User run in DUC.Select("")) { User u = new User(); u.FromDalObject(run); list.Add(u); } } catch (Exception e) { log.Error("faild to load data"); throw new Exception("faild to load data: " + e.Message); } }
private int FindID(string email) { Duc = new DC.UserCtrl(); return(Duc.FindLastID(email)); }