Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromKpewfinal(ref DataRow row, Kpewfinal entity)
 {
     row.SetField("seqno", entity.seqno);
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("glwhse", entity.glwhse);
     row.SetField("rrarinit", entity.rrarinit);
     row.SetField("begwono", entity.begwono);
     row.SetField("validatepickticketsp", entity.validatepickticketsp);
     row.SetField("validatereceiptsp", entity.validatereceiptsp);
     row.SetField("receiptstype", entity.receiptstype);
     row.SetField("receiptsprinter", entity.receiptsprinter);
     row.SetField("pickticketstype", entity.pickticketstype);
     row.SetField("pickticketsprinter", entity.pickticketsprinter);
     row.SetField("printorder", entity.printorder);
     row.SetField("workordersexistfl", entity.workordersexistfl);
     row.SetField("nopostings", entity.nopostings);
     row.SetField("totcr", entity.totcr);
     row.SetField("totdr", entity.totdr);
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Kpewfinal BuildKpewfinalFromRow(DataRow row)
        {
            Kpewfinal entity = new Kpewfinal();

            entity.seqno                = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.jrnlno               = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.glwhse               = row.IsNull("glwhse") ? string.Empty : row.Field <string>("glwhse");
            entity.rrarinit             = row.IsNull("rrarinit") ? string.Empty : row.Field <string>("rrarinit");
            entity.begwono              = row.IsNull("begwono") ? 0 : row.Field <int>("begwono");
            entity.validatepickticketsp = row.Field <bool>("validatepickticketsp");
            entity.validatereceiptsp    = row.Field <bool>("validatereceiptsp");
            entity.receiptstype         = row.IsNull("receiptstype") ? string.Empty : row.Field <string>("receiptstype");
            entity.receiptsprinter      = row.IsNull("receiptsprinter") ? string.Empty : row.Field <string>("receiptsprinter");
            entity.pickticketstype      = row.IsNull("pickticketstype") ? string.Empty : row.Field <string>("pickticketstype");
            entity.pickticketsprinter   = row.IsNull("pickticketsprinter") ? string.Empty : row.Field <string>("pickticketsprinter");
            entity.printorder           = row.IsNull("printorder") ? string.Empty : row.Field <string>("printorder");
            entity.workordersexistfl    = row.Field <bool>("workordersexistfl");
            entity.nopostings           = row.IsNull("nopostings") ? 0 : row.Field <int>("nopostings");
            entity.totcr                = row.IsNull("totcr") ? decimal.Zero : row.Field <decimal>("totcr");
            entity.totdr                = row.IsNull("totdr") ? decimal.Zero : row.Field <decimal>("totdr");
            entity.userfield            = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }