コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromRcvlabelcriteria(ref DataRow row, Rcvlabelcriteria entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("abs_num", entity.absNum);
     row.SetField("bin_num", entity.binNum);
     row.SetField("lot", entity.lot);
     row.SetField("label_size", entity.labelSize);
     row.SetField("printer_id", entity.printerId);
     row.SetField("quantity", entity.quantity);
     row.SetField("emp_num", entity.empNum);
     row.SetField("rcvlabeluserfield", entity.rcvlabeluserfield);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Rcvlabelcriteria BuildRcvlabelcriteriaFromRow(DataRow row)
        {
            Rcvlabelcriteria entity = new Rcvlabelcriteria();

            entity.coNum             = row.IsNull("co_num") ? string.Empty : row.Field <string>("co_num");
            entity.whNum             = row.IsNull("wh_num") ? string.Empty : row.Field <string>("wh_num");
            entity.absNum            = row.IsNull("abs_num") ? string.Empty : row.Field <string>("abs_num");
            entity.binNum            = row.IsNull("bin_num") ? string.Empty : row.Field <string>("bin_num");
            entity.lot               = row.IsNull("lot") ? string.Empty : row.Field <string>("lot");
            entity.labelSize         = row.IsNull("label_size") ? string.Empty : row.Field <string>("label_size");
            entity.printerId         = row.IsNull("printer_id") ? string.Empty : row.Field <string>("printer_id");
            entity.quantity          = row.IsNull("quantity") ? 0 : row.Field <int>("quantity");
            entity.empNum            = row.IsNull("emp_num") ? string.Empty : row.Field <string>("emp_num");
            entity.rcvlabeluserfield = row.IsNull("rcvlabeluserfield") ? string.Empty : row.Field <string>("rcvlabeluserfield");
            entity.userfield         = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }