Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromResendtransdetail(ref DataRow row, Resendtransdetail entity)
 {
     row.SetField("trans_num", entity.transNum);
     row.SetField("date_time", entity.dateTime);
     row.SetField("trans_type", entity.transType);
     row.SetField("trans_name", entity.transName);
     row.SetField("abs_num", entity.absNum);
     row.SetField("po_number", entity.poNumber);
     row.SetField("po_suffix", entity.poSuffix);
     row.SetField("item_qty", entity.itemQty);
     row.SetField("sugg_qty", entity.suggQty);
     row.SetField("comments", entity.comments);
     row.SetField("mach_type", entity.machType);
     row.SetField("proc_created", entity.procCreated);
     row.SetField("result_code", entity.resultCode);
     row.SetField("result_msg", entity.resultMsg);
     row.SetField("resendtransdetailuserfield", entity.resendtransdetailuserfield);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Resendtransdetail BuildResendtransdetailFromRow(DataRow row)
        {
            Resendtransdetail entity = new Resendtransdetail();

            entity.transNum    = row.IsNull("trans_num") ? 0 : row.Field <int>("trans_num");
            entity.dateTime    = row.IsNull("date_time") ? string.Empty : row.Field <string>("date_time");
            entity.transType   = row.IsNull("trans_type") ? string.Empty : row.Field <string>("trans_type");
            entity.transName   = row.IsNull("trans_name") ? string.Empty : row.Field <string>("trans_name");
            entity.absNum      = row.IsNull("abs_num") ? string.Empty : row.Field <string>("abs_num");
            entity.poNumber    = row.IsNull("po_number") ? string.Empty : row.Field <string>("po_number");
            entity.poSuffix    = row.IsNull("po_suffix") ? string.Empty : row.Field <string>("po_suffix");
            entity.itemQty     = row.IsNull("item_qty") ? decimal.Zero : row.Field <decimal>("item_qty");
            entity.suggQty     = row.IsNull("sugg_qty") ? decimal.Zero : row.Field <decimal>("sugg_qty");
            entity.comments    = row.IsNull("comments") ? string.Empty : row.Field <string>("comments");
            entity.machType    = row.IsNull("mach_type") ? string.Empty : row.Field <string>("mach_type");
            entity.procCreated = row.IsNull("proc_created") ? string.Empty : row.Field <string>("proc_created");
            entity.resultCode  = row.IsNull("result_code") ? string.Empty : row.Field <string>("result_code");
            entity.resultMsg   = row.IsNull("result_msg") ? string.Empty : row.Field <string>("result_msg");
            entity.resendtransdetailuserfield = row.IsNull("resendtransdetailuserfield") ? string.Empty : row.Field <string>("resendtransdetailuserfield");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }