Exemplo n.º 1
0
        public static Icamusingle BuildIcamusingleFromRow(DataRow row)
        {
            Icamusingle entity = new Icamusingle();

            entity.statustype                 = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype");
            entity.whse                       = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.whsename                   = row.IsNull("whsename") ? string.Empty : row.Field <string>("whsename");
            entity.buyeroroperator            = row.IsNull("buyeroroperator") ? string.Empty : row.Field <string>("buyeroroperator");
            entity.buyername                  = row.IsNull("buyername") ? string.Empty : row.Field <string>("buyername");
            entity.frozenreason               = row.IsNull("frozenreason") ? string.Empty : row.Field <string>("frozenreason");
            entity.vendno                     = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.vendorname                 = row.IsNull("vendorname") ? string.Empty : row.Field <string>("vendorname");
            entity.vendornotesfl              = row.IsNull("vendornotesfl") ? string.Empty : row.Field <string>("vendornotesfl");
            entity.prodline                   = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline");
            entity.productlinedesc            = row.IsNull("productlinedesc") ? string.Empty : row.Field <string>("productlinedesc");
            entity.fmprodcat                  = row.IsNull("fmprodcat") ? string.Empty : row.Field <string>("fmprodcat");
            entity.fromprodcatdesc            = row.IsNull("fromprodcatdesc") ? string.Empty : row.Field <string>("fromprodcatdesc");
            entity.toprodcat                  = row.IsNull("toprodcat") ? string.Empty : row.Field <string>("toprodcat");
            entity.toprodcatdesc              = row.IsNull("toprodcatdesc") ? string.Empty : row.Field <string>("toprodcatdesc");
            entity.fmclass                    = row.IsNull("fmclass") ? 0 : row.Field <int>("fmclass");
            entity.toclass                    = row.IsNull("toclass") ? 0 : row.Field <int>("toclass");
            entity.fmrank                     = row.IsNull("fmrank") ? string.Empty : row.Field <string>("fmrank");
            entity.torank                     = row.IsNull("torank") ? string.Empty : row.Field <string>("torank");
            entity.numranks                   = row.IsNull("numranks") ? 0 : row.Field <int>("numranks");
            entity.homewhsefl                 = row.Field <bool>("homewhsefl");
            entity.homewhse                   = row.IsNull("homewhse") ? string.Empty : row.Field <string>("homewhse");
            entity.superfl                    = row.Field <bool>("superfl");
            entity.icmanlistty                = row.IsNull("icmanlistty") ? string.Empty : row.Field <string>("icmanlistty");
            entity.icmanlistoverfl            = row.Field <bool>("icmanlistoverfl");
            entity.icmassmaintfl              = row.Field <bool>("icmassmaintfl");
            entity.icswstchgfl                = row.Field <bool>("icswstchgfl");
            entity.countryoforigin            = row.IsNull("countryoforigin") ? string.Empty : row.Field <string>("countryoforigin");
            entity.linehitsHidden             = row.Field <bool>("linehits-hidden");
            entity.oorderptHidden             = row.Field <bool>("oorderpt-hidden");
            entity.olineptHidden              = row.Field <bool>("olinept-hidden");
            entity.whserankHidden             = row.Field <bool>("whserank-hidden");
            entity.safetyqtyHidden            = row.Field <bool>("safetyqty-hidden");
            entity.usageHidden                = row.Field <bool>("usage-hidden");
            entity.rsStatusSensitive          = row.Field <bool>("rsStatus-sensitive");
            entity.txtBuyerorOperator         = row.IsNull("txtBuyerorOperator") ? string.Empty : row.Field <string>("txtBuyerorOperator");
            entity.fiBuyerorOperatorSensitive = row.Field <bool>("fiBuyerorOperator-sensitive");
            entity.cbFrozenReasonSensitive    = row.Field <bool>("cbFrozenReason-sensitive");
            entity.cbFromRankHidden           = row.Field <bool>("cbFromRank-hidden");
            entity.cbFromRankSensitive        = row.Field <bool>("cbFromRank-sensitive");
            entity.cbToRankHidden             = row.Field <bool>("cbToRank-hidden");
            entity.cbToRankSensitive          = row.Field <bool>("cbToRank-sensitive");
            entity.btnExceptionsHidden        = row.Field <bool>("btnExceptions-hidden");
            entity.btnExceptionsSensitive     = row.Field <bool>("btnExceptions-sensitive");
            entity.exceptlist                 = row.IsNull("exceptlist") ? string.Empty : row.Field <string>("exceptlist");
            entity.recordcountlimit           = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.morerecords                = row.Field <bool>("morerecords");
            entity.paramdata                  = row.IsNull("paramdata") ? string.Empty : row.Field <string>("paramdata");
            entity.userfield                  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcamusingle(ref DataRow row, Icamusingle entity)
 {
     row.SetField("statustype", entity.statustype);
     row.SetField("whse", entity.whse);
     row.SetField("whsename", entity.whsename);
     row.SetField("buyeroroperator", entity.buyeroroperator);
     row.SetField("buyername", entity.buyername);
     row.SetField("frozenreason", entity.frozenreason);
     row.SetField("vendno", entity.vendno);
     row.SetField("vendorname", entity.vendorname);
     row.SetField("vendornotesfl", entity.vendornotesfl);
     row.SetField("prodline", entity.prodline);
     row.SetField("productlinedesc", entity.productlinedesc);
     row.SetField("fmprodcat", entity.fmprodcat);
     row.SetField("fromprodcatdesc", entity.fromprodcatdesc);
     row.SetField("toprodcat", entity.toprodcat);
     row.SetField("toprodcatdesc", entity.toprodcatdesc);
     row.SetField("fmclass", entity.fmclass);
     row.SetField("toclass", entity.toclass);
     row.SetField("fmrank", entity.fmrank);
     row.SetField("torank", entity.torank);
     row.SetField("numranks", entity.numranks);
     row.SetField("homewhsefl", entity.homewhsefl);
     row.SetField("homewhse", entity.homewhse);
     row.SetField("superfl", entity.superfl);
     row.SetField("icmanlistty", entity.icmanlistty);
     row.SetField("icmanlistoverfl", entity.icmanlistoverfl);
     row.SetField("icmassmaintfl", entity.icmassmaintfl);
     row.SetField("icswstchgfl", entity.icswstchgfl);
     row.SetField("countryoforigin", entity.countryoforigin);
     row.SetField("linehits-hidden", entity.linehitsHidden);
     row.SetField("oorderpt-hidden", entity.oorderptHidden);
     row.SetField("olinept-hidden", entity.olineptHidden);
     row.SetField("whserank-hidden", entity.whserankHidden);
     row.SetField("safetyqty-hidden", entity.safetyqtyHidden);
     row.SetField("usage-hidden", entity.usageHidden);
     row.SetField("rsStatus-sensitive", entity.rsStatusSensitive);
     row.SetField("txtBuyerorOperator", entity.txtBuyerorOperator);
     row.SetField("fiBuyerorOperator-sensitive", entity.fiBuyerorOperatorSensitive);
     row.SetField("cbFrozenReason-sensitive", entity.cbFrozenReasonSensitive);
     row.SetField("cbFromRank-hidden", entity.cbFromRankHidden);
     row.SetField("cbFromRank-sensitive", entity.cbFromRankSensitive);
     row.SetField("cbToRank-hidden", entity.cbToRankHidden);
     row.SetField("cbToRank-sensitive", entity.cbToRankSensitive);
     row.SetField("btnExceptions-hidden", entity.btnExceptionsHidden);
     row.SetField("btnExceptions-sensitive", entity.btnExceptionsSensitive);
     row.SetField("exceptlist", entity.exceptlist);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("morerecords", entity.morerecords);
     row.SetField("paramdata", entity.paramdata);
     row.SetField("userfield", entity.userfield);
 }