/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromGletioffsetacctinfo(ref DataRow row, Gletioffsetacctinfo entity) { row.SetField("jrnlno", entity.jrnlno); row.SetField("totalamount", entity.totalamount); row.SetField("discglar", entity.discglar); row.SetField("discglap", entity.discglap); row.SetField("posttype", entity.posttype); row.SetField("discdiv", entity.discdiv); row.SetField("discdept", entity.discdept); row.SetField("discacct", entity.discacct); row.SetField("discsub", entity.discsub); row.SetField("excontamt", entity.excontamt); row.SetField("adjdiv", entity.adjdiv); row.SetField("adjdept", entity.adjdept); row.SetField("adjacct", entity.adjacct); row.SetField("adjsub", entity.adjsub); }
public static Gletioffsetacctinfo BuildGletioffsetacctinfoFromRow(DataRow row) { Gletioffsetacctinfo entity = new Gletioffsetacctinfo(); entity.jrnlno = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno"); entity.totalamount = row.IsNull("totalamount") ? decimal.Zero : row.Field <decimal>("totalamount"); entity.discglar = row.IsNull("discglar") ? decimal.Zero : row.Field <decimal>("discglar"); entity.discglap = row.IsNull("discglap") ? decimal.Zero : row.Field <decimal>("discglap"); entity.posttype = row.IsNull("posttype") ? 0 : row.Field <int>("posttype"); entity.discdiv = row.IsNull("discdiv") ? 0 : row.Field <int>("discdiv"); entity.discdept = row.IsNull("discdept") ? 0 : row.Field <int>("discdept"); entity.discacct = row.IsNull("discacct") ? 0 : row.Field <int>("discacct"); entity.discsub = row.IsNull("discsub") ? 0 : row.Field <int>("discsub"); entity.excontamt = row.IsNull("excontamt") ? decimal.Zero : row.Field <decimal>("excontamt"); entity.adjdiv = row.IsNull("adjdiv") ? 0 : row.Field <int>("adjdiv"); entity.adjdept = row.IsNull("adjdept") ? 0 : row.Field <int>("adjdept"); entity.adjacct = row.IsNull("adjacct") ? 0 : row.Field <int>("adjacct"); entity.adjsub = row.IsNull("adjsub") ? 0 : row.Field <int>("adjsub"); return(entity); }