public static bool IsUserInRole(string userName, string roleName) { ECountContext _context = new ECountContext(); int count = _context.User.Count(u => u.UserName == userName && u.UserGroup.GroupName == roleName); return((count > 0) ? true : false); }
public void AddRelationTest() { PartSegmentBLL target = new PartSegmentBLL(); // TODO: Initialize to an appropriate value PartSegment relation = null; // TODO: Initialize to an appropriate value ECountContext outerContext = null; // TODO: Initialize to an appropriate value bool saveChanges = false; // TODO: Initialize to an appropriate value target.AddRelation(relation, saveChanges); Assert.Inconclusive("A method that does not return a value cannot be verified."); }
public List <Workshop> GetWorkshopbyPlantID(int plantID) { ECountContext _context = new ECountContext(); List <Workshop> wsList = _context.Workshop.Include("Plant").Where(p => p.Plant.PlantID == plantID && p.Available == true).ToList(); if (wsList != null && wsList.Count > 0) { return(wsList); } return(new List <Workshop>()); }
public bool Validate(string userName, string password) { ECountContext _context = new ECountContext(); User user = _context.User.Single(u => string.Compare(userName, u.UserName, true) == 0); if (user == null || user.Password != password) { return(false); } return(true); }
public List <Operation> GetOperations() { // return GetObjects().ToList(); // Temporary usage to get menus only ECountContext _context = new ECountContext(); List <Operation> opList = _context.Operation.Where(p => p.ParentOperationID == null).ToList(); if (opList != null && opList.Count > 0) { return(opList); } return(new List <Operation>()); }
public BizParamsBLL(ECountContext context) : base(context, "BizParams") { }
public StoreLocationBLL(ECountContext context) : base(context, "StoreLocation") { }
public WorkshopBLL(ECountContext context) : base(context, "Workshop") { }
public BaseGenericBLL(ECountContext context, string entitySetName) { this._context = context; _entitySetName = _context.DefaultContainerName + "." + entitySetName; }
public BaseGenericBLL(string entitySetName) { _context = new ECountContext(); _context.CommandTimeout = 300; _entitySetName = _context.DefaultContainerName + "." + entitySetName; }
public StockTakeReqBLL(ECountContext context) : base(context, "StocktakeRequest") { }
public StocktakeDetailBLL(ECountContext context) : base(context, "StocktakeDetailBLL") { }
public PlantBLL(ECountContext context) : base(context, "Plant") { }
public WorkshopStocktakeDetailBLL(ECountContext context) : base(context, "WorkshopStocktakeDetail") { }