Пример #1
0
        public static Arilcheckresults BuildArilcheckresultsFromRow(DataRow row)
        {
            Arilcheckresults entity = new Arilcheckresults();

            entity.fibatch     = row.IsNull("fibatch") ? string.Empty : row.Field <string>("fibatch");
            entity.custno      = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.custnotes   = row.IsNull("custnotes") ? string.Empty : row.Field <string>("custnotes");
            entity.checkno     = row.IsNull("checkno") ? 0 : row.Field <int>("checkno");
            entity.checkseq    = row.IsNull("checkseq") ? 0 : row.Field <int>("checkseq");
            entity.checkamt    = row.IsNull("checkamt") ? decimal.Zero : row.Field <decimal>("checkamt");
            entity.autopostfl  = row.Field <bool>("autopostfl");
            entity.lbxpostty   = row.IsNull("lbxpostty") ? string.Empty : row.Field <string>("lbxpostty");
            entity.badcustfl   = row.Field <bool>("badcustfl");
            entity.recvdt      = row.Field <DateTime?>("recvdt");
            entity.statfl      = row.Field <bool>("statfl");
            entity.adddata1    = row.IsNull("adddata1") ? string.Empty : row.Field <string>("adddata1");
            entity.adddata2    = row.IsNull("adddata2") ? string.Empty : row.Field <string>("adddata2");
            entity.adddata3    = row.IsNull("adddata3") ? string.Empty : row.Field <string>("adddata3");
            entity.adddata4    = row.IsNull("adddata4") ? string.Empty : row.Field <string>("adddata4");
            entity.adddata5    = row.IsNull("adddata5") ? string.Empty : row.Field <string>("adddata5");
            entity.pymttranscd = row.IsNull("pymttranscd") ? string.Empty : row.Field <string>("pymttranscd");
            entity.pymttransno = row.IsNull("pymttransno") ? string.Empty : row.Field <string>("pymttransno");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Пример #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromArilcheckresults(ref DataRow row, Arilcheckresults entity)
 {
     row.SetField("fibatch", entity.fibatch);
     row.SetField("custno", entity.custno);
     row.SetField("custnotes", entity.custnotes);
     row.SetField("checkno", entity.checkno);
     row.SetField("checkseq", entity.checkseq);
     row.SetField("checkamt", entity.checkamt);
     row.SetField("autopostfl", entity.autopostfl);
     row.SetField("lbxpostty", entity.lbxpostty);
     row.SetField("badcustfl", entity.badcustfl);
     row.SetField("recvdt", entity.recvdt);
     row.SetField("statfl", entity.statfl);
     row.SetField("adddata1", entity.adddata1);
     row.SetField("adddata2", entity.adddata2);
     row.SetField("adddata3", entity.adddata3);
     row.SetField("adddata4", entity.adddata4);
     row.SetField("adddata5", entity.adddata5);
     row.SetField("pymttranscd", entity.pymttranscd);
     row.SetField("pymttransno", entity.pymttransno);
     row.SetField("userfield", entity.userfield);
 }