Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOesourcing(ref DataRow row, Oesourcing entity)
 {
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("runmode", entity.runmode);
     row.SetField("vendno", entity.vendno);
     row.SetField("ordertype", entity.ordertype);
     row.SetField("shipfmno", entity.shipfmno);
     row.SetField("poduedate", entity.poduedate);
     row.SetField("poshipvia", entity.poshipvia);
     row.SetField("pofrttermscd", entity.pofrttermscd);
     row.SetField("potransferloc", entity.potransferloc);
     row.SetField("pofrtbillacct", entity.pofrtbillacct);
     row.SetField("fob", entity.fob);
     row.SetField("orderaltno", entity.orderaltno);
     row.SetField("confirm", entity.confirm);
     row.SetField("backordertype", entity.backordertype);
     row.SetField("wtwhse", entity.wtwhse);
     row.SetField("wtduedate", entity.wtduedate);
     row.SetField("wtshipvia", entity.wtshipvia);
     row.SetField("copycommentfl", entity.copycommentfl);
     row.SetField("vawhse", entity.vawhse);
     row.SetField("vano", entity.vano);
     row.SetField("vasuf", entity.vasuf);
     row.SetField("manualname", entity.manualname);
     row.SetField("manualaddr1", entity.manualaddr1);
     row.SetField("manualaddr2", entity.manualaddr2);
     row.SetField("manualaddr3", entity.manualaddr3);
     row.SetField("manualcity", entity.manualcity);
     row.SetField("manualstate", entity.manualstate);
     row.SetField("manualzipcd", entity.manualzipcd);
 }
Exemple #2
0
        public static Oesourcing BuildOesourcingFromRow(DataRow row)
        {
            Oesourcing entity = new Oesourcing();

            entity.orderno       = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf      = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.lineno        = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.runmode       = row.IsNull("runmode") ? string.Empty : row.Field <string>("runmode");
            entity.vendno        = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.ordertype     = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype");
            entity.shipfmno      = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno");
            entity.poduedate     = row.Field <DateTime?>("poduedate");
            entity.poshipvia     = row.IsNull("poshipvia") ? string.Empty : row.Field <string>("poshipvia");
            entity.pofrttermscd  = row.IsNull("pofrttermscd") ? string.Empty : row.Field <string>("pofrttermscd");
            entity.potransferloc = row.IsNull("potransferloc") ? string.Empty : row.Field <string>("potransferloc");
            entity.pofrtbillacct = row.IsNull("pofrtbillacct") ? string.Empty : row.Field <string>("pofrtbillacct");
            entity.fob           = row.Field <bool>("fob");
            entity.orderaltno    = row.IsNull("orderaltno") ? 0 : row.Field <int>("orderaltno");
            entity.confirm       = row.Field <bool>("confirm");
            entity.backordertype = row.IsNull("backordertype") ? string.Empty : row.Field <string>("backordertype");
            entity.wtwhse        = row.IsNull("wtwhse") ? string.Empty : row.Field <string>("wtwhse");
            entity.wtduedate     = row.Field <DateTime?>("wtduedate");
            entity.wtshipvia     = row.IsNull("wtshipvia") ? string.Empty : row.Field <string>("wtshipvia");
            entity.copycommentfl = row.Field <bool>("copycommentfl");
            entity.vawhse        = row.IsNull("vawhse") ? string.Empty : row.Field <string>("vawhse");
            entity.vano          = row.IsNull("vano") ? 0 : row.Field <int>("vano");
            entity.vasuf         = row.IsNull("vasuf") ? 0 : row.Field <int>("vasuf");
            entity.manualname    = row.IsNull("manualname") ? string.Empty : row.Field <string>("manualname");
            entity.manualaddr1   = row.IsNull("manualaddr1") ? string.Empty : row.Field <string>("manualaddr1");
            entity.manualaddr2   = row.IsNull("manualaddr2") ? string.Empty : row.Field <string>("manualaddr2");
            entity.manualaddr3   = row.IsNull("manualaddr3") ? string.Empty : row.Field <string>("manualaddr3");
            entity.manualcity    = row.IsNull("manualcity") ? string.Empty : row.Field <string>("manualcity");
            entity.manualstate   = row.IsNull("manualstate") ? string.Empty : row.Field <string>("manualstate");
            entity.manualzipcd   = row.IsNull("manualzipcd") ? string.Empty : row.Field <string>("manualzipcd");
            return(entity);
        }