1: using System;
2: using System.Collections.Generic;
3:
4: namespace Ia.Ngn.Cl.Model.Business.Huawei
5: {
6: ////////////////////////////////////////////////////////////////////////////
7:
8: /// <summary publish="true">
9: /// Huawei's OwSbr Entity Framework class for Next Generation Network (NGN) business model.
10: /// </summary>
11: ///
12: /// <remarks>
13: /// Copyright © 2014-2017 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
14: ///
15: /// 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
16: /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
17: ///
18: /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
19: /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
20: ///
21: /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
22: ///
23: /// Copyright notice: This notice may not be removed or altered from any source distribution.
24: /// </remarks>
25: public partial class Owsbr
26: {
27: /// <summary/>
28: public Owsbr() { }
29:
30: ////////////////////////////////////////////////////////////////////////////
31:
32: /// <summary>
33: ///
34: /// </summary>
35: public static Ia.Ngn.Cl.Model.Huawei.Owsbr ParseFromDictionary(Dictionary<string, string> parameterDictionary)
36: {
37: string impu;
38: Ia.Ngn.Cl.Model.Huawei.Owsbr owsbr;
39:
40: owsbr = new Ia.Ngn.Cl.Model.Huawei.Owsbr();
41:
42: impu = (parameterDictionary.ContainsKey("IMPU")) ? parameterDictionary["IMPU"].ToString() : null;
43:
44: if (impu != null)
45: {
46: owsbr.IMPU = impu;
47:
48: owsbr.US = (parameterDictionary.ContainsKey("US")) ? int.Parse(parameterDictionary["US"].ToString()) : 0;
49:
50: owsbr.Created = DateTime.UtcNow.AddHours(3);
51: owsbr.Updated = DateTime.UtcNow.AddHours(3);
52: //owsbr..UserId = Guid.Empty;
53: }
54: else
55: {
56:
57: }
58:
59: return owsbr;
60: }
61:
62: ////////////////////////////////////////////////////////////////////////////
63:
64: /// <summary>
65: ///
66: /// </summary>
67: public static bool ServiceSuspensionState(Ia.Ngn.Cl.Model.Huawei.Owsbr owsbr)
68: {
69: bool b;
70:
71: b = (owsbr.US != 0); // 0: Normal
72:
73: return b;
74: }
75:
76: ////////////////////////////////////////////////////////////////////////////
77: ////////////////////////////////////////////////////////////////////////////
78: }
79:
80: ////////////////////////////////////////////////////////////////////////////
81: ////////////////////////////////////////////////////////////////////////////
82: }