IBE.SQL.EliteDBIO.CopyEDSystemToDataRow C# (CSharp) Method

CopyEDSystemToDataRow() private method

copies the data from a "EDSystem"-object to a Datarow from table "tbSystems"
private CopyEDSystemToDataRow ( EDSystem SystemObject, DataRow SystemRow, System.Boolean OwnData = false, int SystemID = null, System.Boolean insertUnknown = false ) : void
SystemObject IBE.EDDB_Data.EDSystem
SystemRow System.Data.DataRow
OwnData System.Boolean
SystemID int
insertUnknown System.Boolean
return void
        private void CopyEDSystemToDataRow(EDSystem SystemObject, DataRow SystemRow, Boolean OwnData = false, int? SystemID = null, Boolean insertUnknown = false)
        {
            try
            {

                SystemRow["id"]                     = SystemID == null ? DBConvert.From(SystemObject.Id) : SystemID;
                SystemRow["systemname"]             = DBConvert.From(SystemObject.Name);
                SystemRow["x"]                      = DBConvert.From(SystemObject.X);
                SystemRow["y"]                      = DBConvert.From(SystemObject.Y);
                SystemRow["z"]                      = DBConvert.From(SystemObject.Z);
                SystemRow["faction"]                = DBConvert.From(SystemObject.Faction);
                SystemRow["population"]             = DBConvert.From(SystemObject.Population);
                SystemRow["government_id"]          = DBConvert.From(BaseTableNameToID("government", SystemObject.Government, insertUnknown));
                SystemRow["allegiance_id"]          = DBConvert.From(BaseTableNameToID("allegiance", SystemObject.Allegiance, insertUnknown));
                SystemRow["state_id"]               = DBConvert.From(BaseTableNameToID("state", SystemObject.State, insertUnknown));
                SystemRow["security_id"]            = DBConvert.From(BaseTableNameToID("security", SystemObject.Security, insertUnknown));
                SystemRow["primary_economy_id"]     = DBConvert.From(BaseTableNameToID("economy", SystemObject.PrimaryEconomy, insertUnknown));
                SystemRow["power_id"]               = DBConvert.From(BaseTableNameToID("power", SystemObject.Power, insertUnknown));
                SystemRow["powerstate_id"]          = DBConvert.From(BaseTableNameToID("powerstate", SystemObject.PowerState, insertUnknown));
                SystemRow["needs_permit"]           = DBConvert.From(SystemObject.NeedsPermit);
                SystemRow["updated_at"]             = DBConvert.From(DateTimeOffset.FromUnixTimeSeconds(SystemObject.UpdatedAt).DateTime);
                SystemRow["is_changed"]             = OwnData ? DBConvert.From(1) : DBConvert.From(0);
                SystemRow["visited"]                = DBConvert.From(0);

            }
            catch (Exception ex)
            {
                throw new Exception("Error while copying system data", ex);
            }
        }