Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromAriccreatetranscriteria(ref DataRow row, Ariccreatetranscriteria entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("invoiceno", entity.invoiceno);
     row.SetField("checkno", entity.checkno);
     row.SetField("divno", entity.divno);
     row.SetField("datefrom", entity.datefrom);
     row.SetField("datethru", entity.datethru);
     row.SetField("duedatefrom", entity.duedatefrom);
     row.SetField("duedatethru", entity.duedatethru);
     row.SetField("statusselected", entity.statusselected);
     row.SetField("transselected", entity.transselected);
     row.SetField("paytype", entity.paytype);
     row.SetField("shipto", entity.shipto);
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("setno", entity.setno);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("groupid", entity.groupid);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Ariccreatetranscriteria BuildAriccreatetranscriteriaFromRow(DataRow row)
        {
            Ariccreatetranscriteria entity = new Ariccreatetranscriteria();

            entity.custno           = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.invoiceno        = row.IsNull("invoiceno") ? 0 : row.Field <int>("invoiceno");
            entity.checkno          = row.IsNull("checkno") ? decimal.Zero : row.Field <decimal>("checkno");
            entity.divno            = row.IsNull("divno") ? 0 : row.Field <int>("divno");
            entity.datefrom         = row.Field <DateTime?>("datefrom");
            entity.datethru         = row.Field <DateTime?>("datethru");
            entity.duedatefrom      = row.Field <DateTime?>("duedatefrom");
            entity.duedatethru      = row.Field <DateTime?>("duedatethru");
            entity.statusselected   = row.IsNull("statusselected") ? string.Empty : row.Field <string>("statusselected");
            entity.transselected    = row.IsNull("transselected") ? string.Empty : row.Field <string>("transselected");
            entity.paytype          = row.IsNull("paytype") ? string.Empty : row.Field <string>("paytype");
            entity.shipto           = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.jrnlno           = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.setno            = row.IsNull("setno") ? 0 : row.Field <int>("setno");
            entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.groupid          = row.IsNull("groupid") ? string.Empty : row.Field <string>("groupid");
            entity.userfield        = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }