Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromArecemisccashdata(ref DataRow row, Arecemisccashdata entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("oper", entity.oper);
     row.SetField("acctcd", entity.acctcd);
     row.SetField("acctname", entity.acctname);
     row.SetField("refer", entity.refer);
     row.SetField("proof", entity.proof);
     row.SetField("main-proof", entity.mainProof);
     row.SetField("exchrate", entity.exchrate);
     row.SetField("glyear", entity.glyear);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Arecemisccashdata BuildArecemisccashdataFromRow(DataRow row)
        {
            Arecemisccashdata entity = new Arecemisccashdata();

            entity.cono      = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.oper      = row.IsNull("oper") ? string.Empty : row.Field <string>("oper");
            entity.acctcd    = row.IsNull("acctcd") ? string.Empty : row.Field <string>("acctcd");
            entity.acctname  = row.IsNull("acctname") ? string.Empty : row.Field <string>("acctname");
            entity.refer     = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.proof     = row.IsNull("proof") ? decimal.Zero : row.Field <decimal>("proof");
            entity.mainProof = row.IsNull("main-proof") ? decimal.Zero : row.Field <decimal>("main-proof");
            entity.exchrate  = row.IsNull("exchrate") ? decimal.Zero : row.Field <decimal>("exchrate");
            entity.glyear    = row.IsNull("glyear") ? 0 : row.Field <int>("glyear");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }