public int SaveSearchItemsComponentViewForExport(IUndercarriageContext _context, int pageNo, int pageSize, List <SearchItem> searchItems, IPrincipal user, int _clientReqId, string memberName, string sortName, bool ascendingOrder) { var items = searchItems.Select(m => new SEARCH_ITEM { ItemId = m.Id, SearchId = m.SearchId, SearchStr = m.SearchStr, Title = m.Title }).ToArray(); var item = new DASHBOARD_SEARCH { ascendingOrder = ascendingOrder, memberName = memberName, PageNo = pageNo, PageSize = pageSize, sortName = sortName, ViewId = 1, //1 -> Component View SearchItems = items }; _context.DASHBOARD_SEARCH.Add(item); try { _context.SaveChanges(); return(item.Id); } catch (Exception ex) { throw new Exception(ex.ToDetailedString()); } }
public Compart(IUndercarriageContext context, int id) : base(context) { Id = 0; DefaultBudgetLife = 0; DALCompart = _context.LU_COMPART.Find(id); if (DALCompart != null) { Id = id; DALType = DALCompart.LU_COMPART_TYPE; } }
public async Task <ComponentSearchViewModel> getDashboardEquipmentView(IUndercarriageContext _context, int printId, int PageNo, int PageSize, IPrincipal user, int userId = 0) { var _printSearch = _context.DASHBOARD_SEARCH.Find(printId); string _sortName = "lastInspectionDateAsDate"; bool _asc = true; if (_printSearch != null) { _sortName = _printSearch.sortName; _asc = _printSearch.ascendingOrder; _searchItems = _printSearch.SearchItems.Select(m => new SearchItem { Id = m.ItemId, SearchId = m.SearchId, SearchStr = m.SearchStr, Title = m.Title }).ToList(); } return(await getDashboardEquipmentView(new SharedContext(), PageNo, PageSize, _searchItems, user, _clientReqId : 0, sortName : _sortName, asc : _asc, userId : userId)); }
public bool UpdatePrintItem(IUndercarriageContext _context, int printId, string htmlText, string htmlElement) { var _item = _context.DASHBOARD_SEARCH.Find(printId); if (_item == null) { return(false); } _item.Html = htmlText; _item.Element = htmlElement; _context.MarkAsModified(_item); try { _context.SaveChanges(); return(true); } catch { return(false); } }
public UCInspection(IUndercarriageContext context, int InspectionId) : base(context) { Id = InspectionId; }
public UCInspection(IUndercarriageContext context) : base(context) { }
public MeasurementPoint(IUndercarriageContext context, int MeasurepointId) : base(context) { Id = MeasurepointId; }
public UCModel(IUndercarriageContext context) : base(context) { }
public Customer(IUndercarriageContext context) : base(context) { }
public ComponentRepository(IUndercarriageContext context, IEquipment equipment, IUCSystem system, GeneralComponent component) : base(context) { _equipment = equipment; _system = system; _component = component; }
public ComponentRepository(IUndercarriageContext context, IEquipment equipment) : base(context) { _equipment = equipment; _system = new UCSystem(context); _component = new GeneralComponent(); }
public UCDomain(IUndercarriageContext context) { _domainContext = context; }
public EquipmentRepository(IUndercarriageContext context, IEquipment equipment, List <IUCSystem> systems, List <IComponent> components) : base(context) { _equipment = equipment; _systems = systems; _components = components; }
public EquipmentRepository(IUndercarriageContext context, IEquipment equipment) : base(context) { _equipment = equipment; _systems = new List <IUCSystem>(); _components = new List <IComponent>(); }
public Compart(IUndercarriageContext context) : base(context) { Id = 0; DefaultBudgetLife = 0; }
public MeasurementPoint(IUndercarriageContext context) : base(context) { }
public Dealership(IUndercarriageContext context) : base(context) { }