/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromApivcreatetranscriteria(ref DataRow row, Apivcreatetranscriteria entity) { row.SetField("vendno", entity.vendno); row.SetField("jrnlno", entity.jrnlno); row.SetField("setno", entity.setno); row.SetField("invoicenumber", entity.invoicenumber); row.SetField("achinvno", entity.achinvno); row.SetField("achbankno", entity.achbankno); row.SetField("checknumber", entity.checknumber); row.SetField("pono", entity.pono); row.SetField("posuf", entity.posuf); row.SetField("poallsuffixes", entity.poallsuffixes); row.SetField("divno", entity.divno); row.SetField("statustype", entity.statustype); row.SetField("transtypes", entity.transtypes); row.SetField("fromdate", entity.fromdate); row.SetField("todate", entity.todate); row.SetField("showorigdetail", entity.showorigdetail); row.SetField("recordcountlimit", entity.recordcountlimit); }
public static Apivcreatetranscriteria BuildApivcreatetranscriteriaFromRow(DataRow row) { Apivcreatetranscriteria entity = new Apivcreatetranscriteria(); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.jrnlno = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno"); entity.setno = row.IsNull("setno") ? 0 : row.Field <int>("setno"); entity.invoicenumber = row.IsNull("invoicenumber") ? string.Empty : row.Field <string>("invoicenumber"); entity.achinvno = row.IsNull("achinvno") ? string.Empty : row.Field <string>("achinvno"); entity.achbankno = row.IsNull("achbankno") ? 0 : row.Field <int>("achbankno"); entity.checknumber = row.IsNull("checknumber") ? decimal.Zero : row.Field <decimal>("checknumber"); entity.pono = row.IsNull("pono") ? 0 : row.Field <int>("pono"); entity.posuf = row.IsNull("posuf") ? 0 : row.Field <int>("posuf"); entity.poallsuffixes = row.Field <bool>("poallsuffixes"); entity.divno = row.IsNull("divno") ? 0 : row.Field <int>("divno"); entity.statustype = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype"); entity.transtypes = row.IsNull("transtypes") ? string.Empty : row.Field <string>("transtypes"); entity.fromdate = row.Field <DateTime?>("fromdate"); entity.todate = row.Field <DateTime?>("todate"); entity.showorigdetail = row.Field <bool>("showorigdetail"); entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit"); return(entity); }