/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromAreceupdatescrnsingle(ref DataRow row, Areceupdatescrnsingle entity) { row.SetField("divno-1visible", entity.divno1visible); row.SetField("divno-2visible", entity.divno2visible); row.SetField("divno-3visible", entity.divno3visible); row.SetField("divno-4visible", entity.divno4visible); row.SetField("divno-5visible", entity.divno5visible); row.SetField("divno-6visible", entity.divno6visible); row.SetField("divno-7visible", entity.divno7visible); row.SetField("divno-8visible", entity.divno8visible); row.SetField("divno-9visible", entity.divno9visible); row.SetField("divamount-1visible", entity.divamount1visible); row.SetField("divamount-2visible", entity.divamount2visible); row.SetField("divamount-3visible", entity.divamount3visible); row.SetField("divamount-4visible", entity.divamount4visible); row.SetField("divamount-5visible", entity.divamount5visible); row.SetField("divamount-6visible", entity.divamount6visible); row.SetField("divamount-7visible", entity.divamount7visible); row.SetField("divamount-8visible", entity.divamount8visible); row.SetField("divamount-9visible", entity.divamount9visible); row.SetField("divno-1enabled", entity.divno1enabled); row.SetField("divno-2enabled", entity.divno2enabled); row.SetField("divno-3enabled", entity.divno3enabled); row.SetField("divno-4enabled", entity.divno4enabled); row.SetField("divno-5enabled", entity.divno5enabled); row.SetField("divno-6enabled", entity.divno6enabled); row.SetField("divno-7enabled", entity.divno7enabled); row.SetField("divno-8enabled", entity.divno8enabled); row.SetField("divno-9enabled", entity.divno9enabled); row.SetField("divamount-1enabled", entity.divamount1enabled); row.SetField("divamount-2enabled", entity.divamount2enabled); row.SetField("divamount-3enabled", entity.divamount3enabled); row.SetField("divamount-4enabled", entity.divamount4enabled); row.SetField("divamount-5enabled", entity.divamount5enabled); row.SetField("divamount-6enabled", entity.divamount6enabled); row.SetField("divamount-7enabled", entity.divamount7enabled); row.SetField("divamount-8enabled", entity.divamount8enabled); row.SetField("divamount-9enabled", entity.divamount9enabled); row.SetField("divno-1", entity.divno1); row.SetField("divno-2", entity.divno2); row.SetField("divno-3", entity.divno3); row.SetField("divno-4", entity.divno4); row.SetField("divno-5", entity.divno5); row.SetField("divno-6", entity.divno6); row.SetField("divno-7", entity.divno7); row.SetField("divno-8", entity.divno8); row.SetField("divno-9", entity.divno9); row.SetField("divamount-1", entity.divamount1); row.SetField("divamount-2", entity.divamount2); row.SetField("divamount-3", entity.divamount3); row.SetField("divamount-4", entity.divamount4); row.SetField("divamount-5", entity.divamount5); row.SetField("divamount-6", entity.divamount6); row.SetField("divamount-7", entity.divamount7); row.SetField("divamount-8", entity.divamount8); row.SetField("divamount-9", entity.divamount9); row.SetField("rctdivvisible", entity.rctdivvisible); row.SetField("txtproofvisible", entity.txtproofvisible); row.SetField("txtunapplied", entity.txtunapplied); row.SetField("applytext", entity.applytext); row.SetField("creditamount", entity.creditamount); row.SetField("txtproof", entity.txtproof); row.SetField("custno", entity.custno); row.SetField("txtname", entity.txtname); row.SetField("creditamountenabled", entity.creditamountenabled); row.SetField("creditreferenabled", entity.creditreferenabled); row.SetField("creditrefer", entity.creditrefer); row.SetField("l-update", entity.lUpdate); row.SetField("custnovisible", entity.custnovisible); row.SetField("btncustnovisible", entity.btncustnovisible); row.SetField("custnoenabled", entity.custnoenabled); row.SetField("startfield", entity.startfield); row.SetField("g-gldivfl", entity.gGldivfl); row.SetField("userfield", entity.userfield); }
public static Areceupdatescrnsingle BuildAreceupdatescrnsingleFromRow(DataRow row) { Areceupdatescrnsingle entity = new Areceupdatescrnsingle(); entity.divno1visible = row.Field <bool>("divno-1visible"); entity.divno2visible = row.Field <bool>("divno-2visible"); entity.divno3visible = row.Field <bool>("divno-3visible"); entity.divno4visible = row.Field <bool>("divno-4visible"); entity.divno5visible = row.Field <bool>("divno-5visible"); entity.divno6visible = row.Field <bool>("divno-6visible"); entity.divno7visible = row.Field <bool>("divno-7visible"); entity.divno8visible = row.Field <bool>("divno-8visible"); entity.divno9visible = row.Field <bool>("divno-9visible"); entity.divamount1visible = row.Field <bool>("divamount-1visible"); entity.divamount2visible = row.Field <bool>("divamount-2visible"); entity.divamount3visible = row.Field <bool>("divamount-3visible"); entity.divamount4visible = row.Field <bool>("divamount-4visible"); entity.divamount5visible = row.Field <bool>("divamount-5visible"); entity.divamount6visible = row.Field <bool>("divamount-6visible"); entity.divamount7visible = row.Field <bool>("divamount-7visible"); entity.divamount8visible = row.Field <bool>("divamount-8visible"); entity.divamount9visible = row.Field <bool>("divamount-9visible"); entity.divno1enabled = row.Field <bool>("divno-1enabled"); entity.divno2enabled = row.Field <bool>("divno-2enabled"); entity.divno3enabled = row.Field <bool>("divno-3enabled"); entity.divno4enabled = row.Field <bool>("divno-4enabled"); entity.divno5enabled = row.Field <bool>("divno-5enabled"); entity.divno6enabled = row.Field <bool>("divno-6enabled"); entity.divno7enabled = row.Field <bool>("divno-7enabled"); entity.divno8enabled = row.Field <bool>("divno-8enabled"); entity.divno9enabled = row.Field <bool>("divno-9enabled"); entity.divamount1enabled = row.Field <bool>("divamount-1enabled"); entity.divamount2enabled = row.Field <bool>("divamount-2enabled"); entity.divamount3enabled = row.Field <bool>("divamount-3enabled"); entity.divamount4enabled = row.Field <bool>("divamount-4enabled"); entity.divamount5enabled = row.Field <bool>("divamount-5enabled"); entity.divamount6enabled = row.Field <bool>("divamount-6enabled"); entity.divamount7enabled = row.Field <bool>("divamount-7enabled"); entity.divamount8enabled = row.Field <bool>("divamount-8enabled"); entity.divamount9enabled = row.Field <bool>("divamount-9enabled"); entity.divno1 = row.IsNull("divno-1") ? 0 : row.Field <int>("divno-1"); entity.divno2 = row.IsNull("divno-2") ? 0 : row.Field <int>("divno-2"); entity.divno3 = row.IsNull("divno-3") ? 0 : row.Field <int>("divno-3"); entity.divno4 = row.IsNull("divno-4") ? 0 : row.Field <int>("divno-4"); entity.divno5 = row.IsNull("divno-5") ? 0 : row.Field <int>("divno-5"); entity.divno6 = row.IsNull("divno-6") ? 0 : row.Field <int>("divno-6"); entity.divno7 = row.IsNull("divno-7") ? 0 : row.Field <int>("divno-7"); entity.divno8 = row.IsNull("divno-8") ? 0 : row.Field <int>("divno-8"); entity.divno9 = row.IsNull("divno-9") ? 0 : row.Field <int>("divno-9"); entity.divamount1 = row.IsNull("divamount-1") ? decimal.Zero : row.Field <decimal>("divamount-1"); entity.divamount2 = row.IsNull("divamount-2") ? decimal.Zero : row.Field <decimal>("divamount-2"); entity.divamount3 = row.IsNull("divamount-3") ? decimal.Zero : row.Field <decimal>("divamount-3"); entity.divamount4 = row.IsNull("divamount-4") ? decimal.Zero : row.Field <decimal>("divamount-4"); entity.divamount5 = row.IsNull("divamount-5") ? decimal.Zero : row.Field <decimal>("divamount-5"); entity.divamount6 = row.IsNull("divamount-6") ? decimal.Zero : row.Field <decimal>("divamount-6"); entity.divamount7 = row.IsNull("divamount-7") ? decimal.Zero : row.Field <decimal>("divamount-7"); entity.divamount8 = row.IsNull("divamount-8") ? decimal.Zero : row.Field <decimal>("divamount-8"); entity.divamount9 = row.IsNull("divamount-9") ? decimal.Zero : row.Field <decimal>("divamount-9"); entity.rctdivvisible = row.Field <bool>("rctdivvisible"); entity.txtproofvisible = row.Field <bool>("txtproofvisible"); entity.txtunapplied = row.IsNull("txtunapplied") ? string.Empty : row.Field <string>("txtunapplied"); entity.applytext = row.IsNull("applytext") ? string.Empty : row.Field <string>("applytext"); entity.creditamount = row.IsNull("creditamount") ? decimal.Zero : row.Field <decimal>("creditamount"); entity.txtproof = row.IsNull("txtproof") ? string.Empty : row.Field <string>("txtproof"); entity.custno = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno"); entity.txtname = row.IsNull("txtname") ? string.Empty : row.Field <string>("txtname"); entity.creditamountenabled = row.Field <bool>("creditamountenabled"); entity.creditreferenabled = row.Field <bool>("creditreferenabled"); entity.creditrefer = row.IsNull("creditrefer") ? string.Empty : row.Field <string>("creditrefer"); entity.lUpdate = row.Field <bool>("l-update"); entity.custnovisible = row.Field <bool>("custnovisible"); entity.btncustnovisible = row.Field <bool>("btncustnovisible"); entity.custnoenabled = row.Field <bool>("custnoenabled"); entity.startfield = row.IsNull("startfield") ? string.Empty : row.Field <string>("startfield"); entity.gGldivfl = row.Field <bool>("g-gldivfl"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }