Beispiel #1
0
        public static Crecqe BuildCrecqeFromRow(DataRow row)
        {
            Crecqe entity = new Crecqe();

            entity.bankno            = row.IsNull("bankno") ? 0 : row.Field <int>("bankno");
            entity.ckrectype         = row.IsNull("ckrectype") ? 0 : row.Field <int>("ckrectype");
            entity.frombankno        = row.IsNull("frombankno") ? 0 : row.Field <int>("frombankno");
            entity.checkno           = row.IsNull("checkno") ? decimal.Zero : row.Field <decimal>("checkno");
            entity.checknoSensitive  = row.Field <bool>("checkno-sensitive");
            entity.amount            = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount");
            entity.amountSensitive   = row.Field <bool>("amount-sensitive");
            entity.clearfl           = row.Field <bool>("clearfl");
            entity.clearflSensitive  = row.Field <bool>("clearfl-sensitive");
            entity.modulenm          = row.IsNull("modulenm") ? string.Empty : row.Field <string>("modulenm");
            entity.modulenmSensitive = row.Field <bool>("modulenm-sensitive");
            entity.enterdt           = row.Field <DateTime?>("enterdt");
            entity.enterdtSensitive  = row.Field <bool>("enterdt-sensitive");
            entity.refer             = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.referSensitive    = row.Field <bool>("refer-sensitive");
            entity.btnVoidSensitive  = row.Field <bool>("btnVoid-sensitive");
            entity.btnVoidHidden     = row.Field <bool>("btnVoid-hidden");
            entity.lAPVoidFl         = row.Field <bool>("lAPVoidFl");
            entity.lGoVoidAPFl       = row.Field <bool>("lGoVoidAPFl");
            entity.jrnlno            = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.userfield         = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Beispiel #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCrecqe(ref DataRow row, Crecqe entity)
 {
     row.SetField("bankno", entity.bankno);
     row.SetField("ckrectype", entity.ckrectype);
     row.SetField("frombankno", entity.frombankno);
     row.SetField("checkno", entity.checkno);
     row.SetField("checkno-sensitive", entity.checknoSensitive);
     row.SetField("amount", entity.amount);
     row.SetField("amount-sensitive", entity.amountSensitive);
     row.SetField("clearfl", entity.clearfl);
     row.SetField("clearfl-sensitive", entity.clearflSensitive);
     row.SetField("modulenm", entity.modulenm);
     row.SetField("modulenm-sensitive", entity.modulenmSensitive);
     row.SetField("enterdt", entity.enterdt);
     row.SetField("enterdt-sensitive", entity.enterdtSensitive);
     row.SetField("refer", entity.refer);
     row.SetField("refer-sensitive", entity.referSensitive);
     row.SetField("btnVoid-sensitive", entity.btnVoidSensitive);
     row.SetField("btnVoid-hidden", entity.btnVoidHidden);
     row.SetField("lAPVoidFl", entity.lAPVoidFl);
     row.SetField("lGoVoidAPFl", entity.lGoVoidAPFl);
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("userfield", entity.userfield);
 }