Exemplo n.º 1
0
        private static SO_vNET_Profile[] getRecord(
            DataTable dataTable_in
            )
        {
            DataColumn _dc_idprofile     = null;
            DataColumn _dc_name          = null;
            DataColumn _dc_ifapplication = null;
            DataColumn _dc_isdefault     = null;

            SO_vNET_Profile[] _output
                = new SO_vNET_Profile[dataTable_in.Rows.Count];
            for (int r = 0; r < dataTable_in.Rows.Count; r++)
            {
                if (r == 0)
                {
                    _dc_idprofile     = dataTable_in.Columns["IDProfile"];
                    _dc_name          = dataTable_in.Columns["Name"];
                    _dc_ifapplication = dataTable_in.Columns["IFApplication"];
                    _dc_isdefault     = dataTable_in.Columns["IsDefault"];
                }

                _output[r] = new SO_vNET_Profile();
                if (dataTable_in.Rows[r][_dc_idprofile] == System.DBNull.Value)
                {
                    _output[r].IDProfile = 0L;
                }
                else
                {
                    _output[r].IDProfile = (long)dataTable_in.Rows[r][_dc_idprofile];
                }
                if (dataTable_in.Rows[r][_dc_name] == System.DBNull.Value)
                {
                    _output[r].Name = string.Empty;
                }
                else
                {
                    _output[r].Name = (string)dataTable_in.Rows[r][_dc_name];
                }
                if (dataTable_in.Rows[r][_dc_ifapplication] == System.DBNull.Value)
                {
                    _output[r].IFApplication_isNull = true;
                }
                else
                {
                    _output[r].IFApplication = (int)dataTable_in.Rows[r][_dc_ifapplication];
                }
                if (dataTable_in.Rows[r][_dc_isdefault] == System.DBNull.Value)
                {
                    _output[r].IsDefault_isNull = true;
                }
                else
                {
                    _output[r].IsDefault = (bool)dataTable_in.Rows[r][_dc_isdefault];
                }

                _output[r].HasChanges = false;
            }

            return(_output);
        }
Exemplo n.º 2
0
		private static SO_vNET_Profile[] getRecord(
			DataTable dataTable_in
		) {
			DataColumn _dc_idprofile = null;
			DataColumn _dc_name = null;
			DataColumn _dc_ifapplication = null;
			DataColumn _dc_isdefault = null;

			SO_vNET_Profile[] _output 
				= new SO_vNET_Profile[dataTable_in.Rows.Count];
			for (int r = 0; r < dataTable_in.Rows.Count; r++) {
				if (r == 0) {
					_dc_idprofile = dataTable_in.Columns["IDProfile"];
					_dc_name = dataTable_in.Columns["Name"];
					_dc_ifapplication = dataTable_in.Columns["IFApplication"];
					_dc_isdefault = dataTable_in.Columns["IsDefault"];
				}

				_output[r] = new SO_vNET_Profile();
				if (dataTable_in.Rows[r][_dc_idprofile] == System.DBNull.Value) {
					_output[r].IDProfile = 0L;
				} else {
					_output[r].IDProfile = (long)dataTable_in.Rows[r][_dc_idprofile];
				}
				if (dataTable_in.Rows[r][_dc_name] == System.DBNull.Value) {
					_output[r].Name = string.Empty;
				} else {
					_output[r].Name = (string)dataTable_in.Rows[r][_dc_name];
				}
				if (dataTable_in.Rows[r][_dc_ifapplication] == System.DBNull.Value) {
					_output[r].IFApplication_isNull = true;
				} else {
					_output[r].IFApplication = (int)dataTable_in.Rows[r][_dc_ifapplication];
				}
				if (dataTable_in.Rows[r][_dc_isdefault] == System.DBNull.Value) {
					_output[r].IsDefault_isNull = true;
				} else {
					_output[r].IsDefault = (bool)dataTable_in.Rows[r][_dc_isdefault];
				}

				_output[r].HasChanges = false;
			}

			return _output;
		}