Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPoeireceiverno(ref DataRow row, Poeireceiverno entity)
 {
     row.SetField("pono", entity.pono);
     row.SetField("posuf", entity.posuf);
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("receiverno", entity.receiverno);
     row.SetField("expectedln", entity.expectedln);
     row.SetField("expectedqty", entity.expectedqty);
     row.SetField("actualln", entity.actualln);
     row.SetField("actualqty", entity.actualqty);
     row.SetField("diffln", entity.diffln);
     row.SetField("diffqty", entity.diffqty);
     row.SetField("lfirstfl", entity.lfirstfl);
     row.SetField("calcactualln", entity.calcactualln);
     row.SetField("calcactualqty", entity.calcactualqty);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Poeireceiverno BuildPoeireceivernoFromRow(DataRow row)
        {
            Poeireceiverno entity = new Poeireceiverno();

            entity.pono          = row.IsNull("pono") ? 0 : row.Field <int>("pono");
            entity.posuf         = row.IsNull("posuf") ? 0 : row.Field <int>("posuf");
            entity.jrnlno        = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.receiverno    = row.IsNull("receiverno") ? string.Empty : row.Field <string>("receiverno");
            entity.expectedln    = row.IsNull("expectedln") ? 0 : row.Field <int>("expectedln");
            entity.expectedqty   = row.IsNull("expectedqty") ? decimal.Zero : row.Field <decimal>("expectedqty");
            entity.actualln      = row.IsNull("actualln") ? 0 : row.Field <int>("actualln");
            entity.actualqty     = row.IsNull("actualqty") ? decimal.Zero : row.Field <decimal>("actualqty");
            entity.diffln        = row.IsNull("diffln") ? 0 : row.Field <int>("diffln");
            entity.diffqty       = row.IsNull("diffqty") ? decimal.Zero : row.Field <decimal>("diffqty");
            entity.lfirstfl      = row.Field <bool>("lfirstfl");
            entity.calcactualln  = row.IsNull("calcactualln") ? 0 : row.Field <int>("calcactualln");
            entity.calcactualqty = row.IsNull("calcactualqty") ? decimal.Zero : row.Field <decimal>("calcactualqty");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }