1: using System.Collections;
2: using System.Collections.Generic;
3: using System.Data;
4: using System.Linq;
5:
6: namespace Ia.Ngn.Cl.Model.Data.Huawei
7: {
8: ////////////////////////////////////////////////////////////////////////////
9:
10: /// <summary publish="true">
11: /// Huawei's Sbr Entity Framework class for Next Generation Network (NGN) data model.
12: /// </summary>
13: ///
14: /// <remarks>
15: /// Copyright © 2014-2017 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
16: ///
17: /// This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
18: /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
19: ///
20: /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
21: /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
22: ///
23: /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
24: ///
25: /// Copyright notice: This notice may not be removed or altered from any source distribution.
26: /// </remarks>
27: public partial class HuSbr
28: {
29: /// <summary/>
30: public HuSbr() { }
31:
32: ////////////////////////////////////////////////////////////////////////////
33:
34: /// <summary>
35: ///
36: /// </summary>
37: public static Ia.Ngn.Cl.Model.Huawei.HuSbr Read(string impu)
38: {
39: Ia.Ngn.Cl.Model.Huawei.HuSbr huSbr;
40:
41: using (var db = new Ia.Ngn.Cl.Model.Ngn())
42: {
43: huSbr = (from s in db.HuSbrs where s.IMPU == impu select s).SingleOrDefault();
44: }
45:
46: return huSbr;
47: }
48:
49: ////////////////////////////////////////////////////////////////////////////
50:
51: /// <summary>
52: ///
53: /// </summary>
54: public static List<Ia.Ngn.Cl.Model.Huawei.HuSbr> ReadList(ArrayList impuList)
55: {
56: long i;
57: long[] sp;
58: List<Ia.Ngn.Cl.Model.Huawei.HuSbr> huSbrList;
59:
60: i = 0;
61: sp = new long[impuList.Count];
62:
63: foreach (long l in impuList) sp[i++] = l;
64:
65: using (var db = new Ia.Ngn.Cl.Model.Ngn())
66: {
67: //serviceList = (from q in db.Services where dnList.Contains(q.DN) select q).ToList();
68:
69: // var pages = context.Pages.Where(x => keys.Any(key => x.Title.Contains(key)));
70: huSbrList = db.HuSbrs.Where(q => sp.Any(v => q.IMPU == v.ToString())).ToList();
71: }
72:
73: return huSbrList;
74: }
75:
76: ////////////////////////////////////////////////////////////////////////////
77:
78: /// <summary>
79: ///
80: /// </summary>
81: public static List<string> ServicePbxList()
82: {
83: var list = new List<string>();
84:
85: return list;
86: }
87:
88: ////////////////////////////////////////////////////////////////////////////
89: ////////////////////////////////////////////////////////////////////////////
90: }
91:
92: ////////////////////////////////////////////////////////////////////////////
93: ////////////////////////////////////////////////////////////////////////////
94: }