Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeheadermaintcustpo(ref DataRow row, Oeheadermaintcustpo entity)
 {
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("custpo", entity.custpo);
     row.SetField("transtype", entity.transtype);
     row.SetField("transtypedspl", entity.transtypedspl);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("stagecddspl", entity.stagecddspl);
     row.SetField("custno", entity.custno);
     row.SetField("custname", entity.custname);
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Oeheadermaintcustpo BuildOeheadermaintcustpoFromRow(DataRow row)
        {
            Oeheadermaintcustpo entity = new Oeheadermaintcustpo();

            entity.orderno       = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf      = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.custpo        = row.IsNull("custpo") ? string.Empty : row.Field <string>("custpo");
            entity.transtype     = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.transtypedspl = row.IsNull("transtypedspl") ? string.Empty : row.Field <string>("transtypedspl");
            entity.stagecd       = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.stagecddspl   = row.IsNull("stagecddspl") ? string.Empty : row.Field <string>("stagecddspl");
            entity.custno        = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.custname      = row.IsNull("custname") ? string.Empty : row.Field <string>("custname");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }