private static SO_vNWS_Author[] getRecord(
			DataTable dataTable_in
		) {
			DataColumn _dc_idauthor = null;
			DataColumn _dc_idapplication = null;
			DataColumn _dc_name = null;
			DataColumn _dc_ifuser__approved = null;
			DataColumn _dc_managername = null;
			DataColumn _dc_approved_date = null;

			SO_vNWS_Author[] _output 
				= new SO_vNWS_Author[dataTable_in.Rows.Count];
			for (int r = 0; r < dataTable_in.Rows.Count; r++) {
				if (r == 0) {
					_dc_idauthor = dataTable_in.Columns["IDAuthor"];
					_dc_idapplication = dataTable_in.Columns["IDApplication"];
					_dc_name = dataTable_in.Columns["Name"];
					_dc_ifuser__approved = dataTable_in.Columns["IFUser__Approved"];
					_dc_managername = dataTable_in.Columns["ManagerName"];
					_dc_approved_date = dataTable_in.Columns["Approved_date"];
				}

				_output[r] = new SO_vNWS_Author();
				if (dataTable_in.Rows[r][_dc_idauthor] == System.DBNull.Value) {
					_output[r].idauthor_ = 0L;
				} else {
					_output[r].idauthor_ = (long)dataTable_in.Rows[r][_dc_idauthor];
				}
				if (dataTable_in.Rows[r][_dc_idapplication] == System.DBNull.Value) {
					_output[r].IDApplication_isNull = true;
				} else {
					_output[r].idapplication_ = (int)dataTable_in.Rows[r][_dc_idapplication];
				}
				if (dataTable_in.Rows[r][_dc_name] == System.DBNull.Value) {
					_output[r].Name_isNull = true;
				} else {
					_output[r].name_ = (string)dataTable_in.Rows[r][_dc_name];
				}
				if (dataTable_in.Rows[r][_dc_ifuser__approved] == System.DBNull.Value) {
					_output[r].IFUser__Approved_isNull = true;
				} else {
					_output[r].ifuser__approved_ = (long)dataTable_in.Rows[r][_dc_ifuser__approved];
				}
				if (dataTable_in.Rows[r][_dc_managername] == System.DBNull.Value) {
					_output[r].ManagerName_isNull = true;
				} else {
					_output[r].managername_ = (string)dataTable_in.Rows[r][_dc_managername];
				}
				if (dataTable_in.Rows[r][_dc_approved_date] == System.DBNull.Value) {
					_output[r].Approved_date_isNull = true;
				} else {
					_output[r].approved_date_ = (DateTime)dataTable_in.Rows[r][_dc_approved_date];
				}

				_output[r].haschanges_ = false;
			}

			return _output;
		}
Beispiel #2
0
        private static SO_vNWS_Author[] getRecord(
            DataTable dataTable_in
            )
        {
            DataColumn _dc_idauthor         = null;
            DataColumn _dc_idapplication    = null;
            DataColumn _dc_name             = null;
            DataColumn _dc_ifuser__approved = null;
            DataColumn _dc_managername      = null;
            DataColumn _dc_approved_date    = null;

            SO_vNWS_Author[] _output
                = new SO_vNWS_Author[dataTable_in.Rows.Count];
            for (int r = 0; r < dataTable_in.Rows.Count; r++)
            {
                if (r == 0)
                {
                    _dc_idauthor         = dataTable_in.Columns["IDAuthor"];
                    _dc_idapplication    = dataTable_in.Columns["IDApplication"];
                    _dc_name             = dataTable_in.Columns["Name"];
                    _dc_ifuser__approved = dataTable_in.Columns["IFUser__Approved"];
                    _dc_managername      = dataTable_in.Columns["ManagerName"];
                    _dc_approved_date    = dataTable_in.Columns["Approved_date"];
                }

                _output[r] = new SO_vNWS_Author();
                if (dataTable_in.Rows[r][_dc_idauthor] == System.DBNull.Value)
                {
                    _output[r].IDAuthor = 0L;
                }
                else
                {
                    _output[r].IDAuthor = (long)dataTable_in.Rows[r][_dc_idauthor];
                }
                if (dataTable_in.Rows[r][_dc_idapplication] == System.DBNull.Value)
                {
                    _output[r].IDApplication_isNull = true;
                }
                else
                {
                    _output[r].IDApplication = (int)dataTable_in.Rows[r][_dc_idapplication];
                }
                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_ifuser__approved] == System.DBNull.Value)
                {
                    _output[r].IFUser__Approved_isNull = true;
                }
                else
                {
                    _output[r].IFUser__Approved = (long)dataTable_in.Rows[r][_dc_ifuser__approved];
                }
                if (dataTable_in.Rows[r][_dc_managername] == System.DBNull.Value)
                {
                    _output[r].ManagerName_isNull = true;
                }
                else
                {
                    _output[r].ManagerName = (string)dataTable_in.Rows[r][_dc_managername];
                }
                if (dataTable_in.Rows[r][_dc_approved_date] == System.DBNull.Value)
                {
                    _output[r].Approved_date_isNull = true;
                }
                else
                {
                    _output[r].Approved_date = (DateTime)dataTable_in.Rows[r][_dc_approved_date];
                }

                _output[r].HasChanges = false;
            }

            return(_output);
        }