Ejemplo n.º 1
0
 private static object[] DataRowViewToArray(DataRowView dataRowView)
 {
     return(new[] {
         dataRowView["ID LicType"],
         dataRowView["LicType"],
         ViewportHelper.ValueOrNull <bool>(dataRowView, "LicKeyDuplicateAllowed") == true
     });
 }
Ejemplo n.º 2
0
 private static object[] DataRowViewToArray(DataRowView dataRowView)
 {
     return(new[] {
         dataRowView["ID Installator"],
         dataRowView["FullName"],
         dataRowView["Profession"],
         ViewportHelper.ValueOrNull <bool>(dataRowView, "inactive") == true
     });
 }
Ejemplo n.º 3
0
        private static SoftMaker RowToSoftType(DataRow row)
        {
            var softMaker = new SoftMaker
            {
                IdSoftMaker   = ViewportHelper.ValueOrNull <int>(row, "ID SoftMaker"),
                SoftMakerName = ViewportHelper.ValueOrNull(row, "SoftMaker")
            };

            return(softMaker);
        }
        private static SoftType RowToSoftType(DataRow row)
        {
            var softType = new SoftType
            {
                IdSoftType   = ViewportHelper.ValueOrNull <int>(row, "ID SoftType"),
                SoftTypeName = ViewportHelper.ValueOrNull(row, "SoftType")
            };

            return(softType);
        }
        private static SoftLicDocType RowToSoftLicDocType(DataRow row)
        {
            var softLicDocType = new SoftLicDocType
            {
                IdDocType = ViewportHelper.ValueOrNull <int>(row, "ID DocType"),
                DocType   = ViewportHelper.ValueOrNull(row, "DocType")
            };

            return(softLicDocType);
        }
Ejemplo n.º 6
0
        private static SoftLicType RowToSoftLicType(DataRow row)
        {
            var softLicType = new SoftLicType
            {
                IdLicType = ViewportHelper.ValueOrNull <int>(row, "ID LicType"),
                LicType   = ViewportHelper.ValueOrNull(row, "LicType"),
                LicKeyDuplicateAllowed = ViewportHelper.ValueOrNull <bool>(row, "LicKeyDuplicateAllowed")
            };

            return(softLicType);
        }
        private static SoftVersion RowToSoftVersion(DataRow row)
        {
            var softVersion = new SoftVersion
            {
                IdVersion  = ViewportHelper.ValueOrNull <int>(row, "ID Version"),
                IdSoftware = ViewportHelper.ValueOrNull <int>(row, "ID Software"),
                Version    = ViewportHelper.ValueOrNull(row, "Version")
            };

            return(softVersion);
        }
        private static SoftLicKey RowToSoftLicKey(DataRow row)
        {
            var softLicKey = new SoftLicKey
            {
                IdLicenseKey = ViewportHelper.ValueOrNull <int>(row, "ID LicenseKey"),
                IdLicense    = ViewportHelper.ValueOrNull <int>(row, "ID License"),
                LicKey       = ViewportHelper.ValueOrNull(row, "LicKey")
            };

            return(softLicKey);
        }
Ejemplo n.º 9
0
        private static SoftInstallator RowToInstallator(DataRow row)
        {
            var si = new SoftInstallator
            {
                IdInstallator = ViewportHelper.ValueOrNull <int>(row, "ID Installator"),
                FullName      = ViewportHelper.ValueOrNull(row, "FullName"),
                Profession    = ViewportHelper.ValueOrNull(row, "Profession"),
                Inactive      = ViewportHelper.ValueOrNull <bool>(row, "Inactive")
            };

            return(si);
        }
Ejemplo n.º 10
0
        private Software SoftwareFromView()
        {
            var row      = (DataRowView)_vSoftware[_vSoftware.Position];
            var software = new Software
            {
                IdSoftware   = ViewportHelper.ValueOrNull <int>(row, "ID Software"),
                IdSoftType   = ViewportHelper.ValueOrNull <int>(row, "ID SoftType"),
                IdSoftMaker  = ViewportHelper.ValueOrNull <int>(row, "ID SoftMaker"),
                SoftwareName = ViewportHelper.ValueOrNull(row, "Software")
            };

            return(software);
        }
Ejemplo n.º 11
0
        private Software SoftwareFromViewport()
        {
            var software = new Software
            {
                IdSoftware = _vSoftware.Position == -1
                    ? null
                    : ViewportHelper.ValueOrNull <int>((DataRowView)_vSoftware[_vSoftware.Position], "ID Software"),
                IdSoftType   = ViewportHelper.ValueOrNull <int>(comboBoxSoftType),
                IdSoftMaker  = ViewportHelper.ValueOrNull <int>(comboBoxSoftMaker),
                SoftwareName = ViewportHelper.ValueOrNull(textBoxSoftwareName)
            };

            return(software);
        }
        private List <SoftLicKey> SoftLicKeysFromView()
        {
            var list = new List <SoftLicKey>();

            for (var i = 0; i < _vSoftLicKeys.Count; i++)
            {
                var slk = new SoftLicKey();
                var row = ((DataRowView)_vSoftLicKeys[i]);
                slk.IdLicenseKey = ViewportHelper.ValueOrNull <int>(row, "ID LicenseKey");
                slk.IdLicense    = ViewportHelper.ValueOrNull <int>(row, "ID License");
                slk.LicKey       = ViewportHelper.ValueOrNull(row, "LicKey");
                list.Add(slk);
            }
            return(list);
        }
Ejemplo n.º 13
0
        private List <SoftLicType> SoftLicTypesFromView()
        {
            var list = new List <SoftLicType>();

            for (var i = 0; i < _vSoftLicTypes.Count; i++)
            {
                var st  = new SoftLicType();
                var row = (DataRowView)_vSoftLicTypes[i];
                st.IdLicType = ViewportHelper.ValueOrNull <int>(row, "ID LicType");
                st.LicType   = ViewportHelper.ValueOrNull(row, "LicType");
                st.LicKeyDuplicateAllowed = ViewportHelper.ValueOrNull <bool>(row, "LicKeyDuplicateAllowed") == true;
                list.Add(st);
            }
            return(list);
        }
Ejemplo n.º 14
0
        private List <SoftMaker> SoftMakersFromView()
        {
            var list = new List <SoftMaker>();

            for (var i = 0; i < _vSoftMakers.Count; i++)
            {
                var row = (DataRowView)_vSoftMakers[i];
                var st  = new SoftMaker
                {
                    IdSoftMaker   = ViewportHelper.ValueOrNull <int>(row, "ID SoftMaker"),
                    SoftMakerName = ViewportHelper.ValueOrNull(row, "SoftMaker")
                };
                list.Add(st);
            }
            return(list);
        }
        private List <SoftLicDocType> SoftLicTypesFromView()
        {
            var list = new List <SoftLicDocType>();

            for (var i = 0; i < _vSoftLicDocTypes.Count; i++)
            {
                var row = (DataRowView)_vSoftLicDocTypes[i];
                var st  = new SoftLicDocType
                {
                    IdDocType = ViewportHelper.ValueOrNull <int>(row, "ID DocType"),
                    DocType   = ViewportHelper.ValueOrNull(row, "DocType")
                };
                list.Add(st);
            }
            return(list);
        }
        private List <SoftVersion> SoftVersionsFromView()
        {
            var list = new List <SoftVersion>();

            for (var i = 0; i < _vSoftVersions.Count; i++)
            {
                var row = (DataRowView)_vSoftVersions[i];
                var sv  = new SoftVersion
                {
                    IdVersion  = ViewportHelper.ValueOrNull <int>(row, "ID Version"),
                    IdSoftware = ViewportHelper.ValueOrNull <int>(row, "ID Software"),
                    Version    = ViewportHelper.ValueOrNull(row, "Version")
                };
                list.Add(sv);
            }
            return(list);
        }
Ejemplo n.º 17
0
        private List <SoftInstallator> InstallatorsFromView()
        {
            var list = new List <SoftInstallator>();

            for (var i = 0; i < _vInstallators.Count; i++)
            {
                var row = (DataRowView)_vInstallators[i];
                var si  = new SoftInstallator
                {
                    IdInstallator = ViewportHelper.ValueOrNull <int>(row, "ID Installator"),
                    FullName      = ViewportHelper.ValueOrNull(row, "FullName"),
                    Profession    = ViewportHelper.ValueOrNull(row, "Profession"),
                    Inactive      = ViewportHelper.ValueOrNull <bool>(row, "Inactive") == true
                };
                list.Add(si);
            }
            return(list);
        }
        private List <SoftLicKey> SoftLicKeysFromViewport()
        {
            var list = new List <SoftLicKey>();

            for (var i = 0; i < dataGridView.Rows.Count; i++)
            {
                if (!dataGridView.Rows[i].IsNewRow)
                {
                    var slk = new SoftLicKey();
                    var row = dataGridView.Rows[i];
                    slk.IdLicenseKey = ViewportHelper.ValueOrNull <int>(row, "idLicenseKey");
                    slk.IdLicense    = ViewportHelper.ValueOrNull <int>(row, "idLicense");
                    slk.LicKey       = ViewportHelper.ValueOrNull(row, "LicKey");
                    list.Add(slk);
                }
            }
            return(list);
        }
Ejemplo n.º 19
0
        private List <SoftMaker> SoftMakersFromViewport()
        {
            var list = new List <SoftMaker>();

            for (var i = 0; i < dataGridView.Rows.Count; i++)
            {
                if (!dataGridView.Rows[i].IsNewRow)
                {
                    var row = dataGridView.Rows[i];
                    var st  = new SoftMaker
                    {
                        IdSoftMaker   = ViewportHelper.ValueOrNull <int>(row, "idSoftMaker"),
                        SoftMakerName = ViewportHelper.ValueOrNull(row, "softMaker")
                    };
                    list.Add(st);
                }
            }
            return(list);
        }
Ejemplo n.º 20
0
        private List <SoftLicType> SoftLicTypesFromViewport()
        {
            var list = new List <SoftLicType>();

            for (var i = 0; i < dataGridView.Rows.Count; i++)
            {
                if (dataGridView.Rows[i].IsNewRow)
                {
                    continue;
                }
                var st  = new SoftLicType();
                var row = dataGridView.Rows[i];
                st.IdLicType = ViewportHelper.ValueOrNull <int>(row, "idSoftLicType");
                st.LicType   = ViewportHelper.ValueOrNull(row, "softLicType");
                st.LicKeyDuplicateAllowed = ViewportHelper.ValueOrNull <bool>(row, "softLicKeyDuplicateAllowed") == true;
                list.Add(st);
            }
            return(list);
        }
        private List <SoftVersion> SoftVersionsFromViewport()
        {
            var list = new List <SoftVersion>();

            for (var i = 0; i < dataGridView.Rows.Count; i++)
            {
                if (!dataGridView.Rows[i].IsNewRow)
                {
                    var row = dataGridView.Rows[i];
                    var sv  = new SoftVersion
                    {
                        IdVersion  = ViewportHelper.ValueOrNull <int>(row, "idVersion"),
                        IdSoftware = ViewportHelper.ValueOrNull <int>(row, "idSoftware"),
                        Version    = ViewportHelper.ValueOrNull(row, "Version")
                    };
                    list.Add(sv);
                }
            }
            return(list);
        }
Ejemplo n.º 22
0
        private List <SoftType> SoftTypesFromViewport()
        {
            var list = new List <SoftType>();

            for (var i = 0; i < dataGridView.Rows.Count; i++)
            {
                if (dataGridView.Rows[i].IsNewRow)
                {
                    continue;
                }
                var row = dataGridView.Rows[i];
                var st  = new SoftType
                {
                    IdSoftType   = ViewportHelper.ValueOrNull <int>(row, "idSoftType"),
                    SoftTypeName = ViewportHelper.ValueOrNull(row, "softType")
                };
                list.Add(st);
            }
            return(list);
        }
Ejemplo n.º 23
0
        private List <SoftInstallator> InstallatorsFromViewport()
        {
            var list = new List <SoftInstallator>();

            for (var i = 0; i < dataGridView.Rows.Count; i++)
            {
                if (dataGridView.Rows[i].IsNewRow)
                {
                    continue;
                }
                var row = dataGridView.Rows[i];
                var si  = new SoftInstallator
                {
                    IdInstallator = ViewportHelper.ValueOrNull <int>(row, "idInstallator"),
                    FullName      = ViewportHelper.ValueOrNull(row, "FullName"),
                    Profession    = ViewportHelper.ValueOrNull(row, "Profession"),
                    Inactive      = ViewportHelper.ValueOrNull <bool>(row, "Inactive") == true
                };
                list.Add(si);
            }
            return(list);
        }