예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCoreallocationsingle(ref DataRow row, Coreallocationsingle entity)
 {
     row.SetField("prod", entity.prod);
     row.SetField("proof", entity.proof);
     row.SetField("viewtitle", entity.viewtitle);
     row.SetField("iRetOrderno", entity.iRetOrderno);
     row.SetField("iRetOrdersuf", entity.iRetOrdersuf);
     row.SetField("iRetLineno", entity.iRetLineno);
     row.SetField("addswoptprodfl", entity.addswoptprodfl);
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Coreallocationsingle BuildCoreallocationsingleFromRow(DataRow row)
        {
            Coreallocationsingle entity = new Coreallocationsingle();

            entity.prod           = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.proof          = row.IsNull("proof") ? decimal.Zero : row.Field <decimal>("proof");
            entity.viewtitle      = row.IsNull("viewtitle") ? string.Empty : row.Field <string>("viewtitle");
            entity.iRetOrderno    = row.IsNull("iRetOrderno") ? 0 : row.Field <int>("iRetOrderno");
            entity.iRetOrdersuf   = row.IsNull("iRetOrdersuf") ? 0 : row.Field <int>("iRetOrdersuf");
            entity.iRetLineno     = row.IsNull("iRetLineno") ? 0 : row.Field <int>("iRetLineno");
            entity.addswoptprodfl = row.Field <bool>("addswoptprodfl");
            entity.userfield      = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }