예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOrderlotcutresults(ref DataRow row, Orderlotcutresults entity)
 {
     row.SetField("whse", entity.whse);
     row.SetField("prod", entity.prod);
     row.SetField("lotno", entity.lotno);
     row.SetField("seqno", entity.seqno);
     row.SetField("ordertype", entity.ordertype);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("ordseqno", entity.ordseqno);
     row.SetField("statustype", entity.statustype);
     row.SetField("displaystatus", entity.displaystatus);
     row.SetField("conditioncd", entity.conditioncd);
     row.SetField("conditiondesc", entity.conditiondesc);
     row.SetField("reasunavty", entity.reasunavty);
     row.SetField("srcorderty", entity.srcorderty);
     row.SetField("srcorderno", entity.srcorderno);
     row.SetField("srcordersuf", entity.srcordersuf);
     row.SetField("srclineno", entity.srclineno);
     row.SetField("quantity", entity.quantity);
     row.SetField("length1", entity.length1);
     row.SetField("length2", entity.length2);
     row.SetField("length3", entity.length3);
     row.SetField("lengthunit", entity.lengthunit);
     row.SetField("width1", entity.width1);
     row.SetField("width2", entity.width2);
     row.SetField("width3", entity.width3);
     row.SetField("widthunit", entity.widthunit);
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Orderlotcutresults BuildOrderlotcutresultsFromRow(DataRow row)
        {
            Orderlotcutresults entity = new Orderlotcutresults();

            entity.whse          = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.prod          = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.lotno         = row.IsNull("lotno") ? string.Empty : row.Field <string>("lotno");
            entity.seqno         = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.ordertype     = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype");
            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.ordseqno      = row.IsNull("ordseqno") ? 0 : row.Field <int>("ordseqno");
            entity.statustype    = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype");
            entity.displaystatus = row.IsNull("displaystatus") ? string.Empty : row.Field <string>("displaystatus");
            entity.conditioncd   = row.IsNull("conditioncd") ? string.Empty : row.Field <string>("conditioncd");
            entity.conditiondesc = row.IsNull("conditiondesc") ? string.Empty : row.Field <string>("conditiondesc");
            entity.reasunavty    = row.IsNull("reasunavty") ? string.Empty : row.Field <string>("reasunavty");
            entity.srcorderty    = row.IsNull("srcorderty") ? string.Empty : row.Field <string>("srcorderty");
            entity.srcorderno    = row.IsNull("srcorderno") ? 0 : row.Field <int>("srcorderno");
            entity.srcordersuf   = row.IsNull("srcordersuf") ? 0 : row.Field <int>("srcordersuf");
            entity.srclineno     = row.IsNull("srclineno") ? 0 : row.Field <int>("srclineno");
            entity.quantity      = row.IsNull("quantity") ? decimal.Zero : row.Field <decimal>("quantity");
            entity.length1       = row.IsNull("length1") ? decimal.Zero : row.Field <decimal>("length1");
            entity.length2       = row.IsNull("length2") ? decimal.Zero : row.Field <decimal>("length2");
            entity.length3       = row.IsNull("length3") ? decimal.Zero : row.Field <decimal>("length3");
            entity.lengthunit    = row.IsNull("lengthunit") ? string.Empty : row.Field <string>("lengthunit");
            entity.width1        = row.IsNull("width1") ? decimal.Zero : row.Field <decimal>("width1");
            entity.width2        = row.IsNull("width2") ? decimal.Zero : row.Field <decimal>("width2");
            entity.width3        = row.IsNull("width3") ? decimal.Zero : row.Field <decimal>("width3");
            entity.widthunit     = row.IsNull("widthunit") ? string.Empty : row.Field <string>("widthunit");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }