Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOrderlinetransinfo(ref DataRow row, Orderlinetransinfo entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("order", entity.order);
     row.SetField("order_suffix", entity.orderSuffix);
     row.SetField("line", entity.line);
     row.SetField("line_sequence", entity.lineSequence);
     row.SetField("first_line_pick_date", entity.firstLinePickDate);
     row.SetField("first_line_pick_emp", entity.firstLinePickEmp);
     row.SetField("first_line_pick_emp_name", entity.firstLinePickEmpName);
     row.SetField("last_line_pick_date", entity.lastLinePickDate);
     row.SetField("last_line_pick_emp", entity.lastLinePickEmp);
     row.SetField("last_line_pick_emp_name", entity.lastLinePickEmpName);
     row.SetField("first_line_pack_date", entity.firstLinePackDate);
     row.SetField("first_line_pack_emp", entity.firstLinePackEmp);
     row.SetField("first_line_pack_emp_name", entity.firstLinePackEmpName);
     row.SetField("last_line_pack_date", entity.lastLinePackDate);
     row.SetField("last_line_pack_emp", entity.lastLinePackEmp);
     row.SetField("last_line_pack_emp_name", entity.lastLinePackEmpName);
     row.SetField("last_ord_ctn_sh_date", entity.lastOrdCtnShDate);
     row.SetField("last_ord_ctn_sh_emp", entity.lastOrdCtnShEmp);
     row.SetField("last_ord_ctn_sh_emp_name", entity.lastOrdCtnShEmpName);
     row.SetField("order_is_a_zero_ship", entity.orderIsAZeroShip);
     row.SetField("last_product_rcv_date", entity.lastProductRcvDate);
     row.SetField("last_product_rcv_emp", entity.lastProductRcvEmp);
     row.SetField("last_product_rcv_emp_name", entity.lastProductRcvEmpName);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Orderlinetransinfo BuildOrderlinetransinfoFromRow(DataRow row)
        {
            Orderlinetransinfo entity = new Orderlinetransinfo();

            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.order                 = row.IsNull("order") ? string.Empty : row.Field <string>("order");
            entity.orderSuffix           = row.IsNull("order_suffix") ? string.Empty : row.Field <string>("order_suffix");
            entity.line                  = row.IsNull("line") ? 0 : row.Field <int>("line");
            entity.lineSequence          = row.IsNull("line_sequence") ? 0 : row.Field <int>("line_sequence");
            entity.firstLinePickDate     = row.IsNull("first_line_pick_date") ? string.Empty : row.Field <string>("first_line_pick_date");
            entity.firstLinePickEmp      = row.IsNull("first_line_pick_emp") ? string.Empty : row.Field <string>("first_line_pick_emp");
            entity.firstLinePickEmpName  = row.IsNull("first_line_pick_emp_name") ? string.Empty : row.Field <string>("first_line_pick_emp_name");
            entity.lastLinePickDate      = row.IsNull("last_line_pick_date") ? string.Empty : row.Field <string>("last_line_pick_date");
            entity.lastLinePickEmp       = row.IsNull("last_line_pick_emp") ? string.Empty : row.Field <string>("last_line_pick_emp");
            entity.lastLinePickEmpName   = row.IsNull("last_line_pick_emp_name") ? string.Empty : row.Field <string>("last_line_pick_emp_name");
            entity.firstLinePackDate     = row.IsNull("first_line_pack_date") ? string.Empty : row.Field <string>("first_line_pack_date");
            entity.firstLinePackEmp      = row.IsNull("first_line_pack_emp") ? string.Empty : row.Field <string>("first_line_pack_emp");
            entity.firstLinePackEmpName  = row.IsNull("first_line_pack_emp_name") ? string.Empty : row.Field <string>("first_line_pack_emp_name");
            entity.lastLinePackDate      = row.IsNull("last_line_pack_date") ? string.Empty : row.Field <string>("last_line_pack_date");
            entity.lastLinePackEmp       = row.IsNull("last_line_pack_emp") ? string.Empty : row.Field <string>("last_line_pack_emp");
            entity.lastLinePackEmpName   = row.IsNull("last_line_pack_emp_name") ? string.Empty : row.Field <string>("last_line_pack_emp_name");
            entity.lastOrdCtnShDate      = row.IsNull("last_ord_ctn_sh_date") ? string.Empty : row.Field <string>("last_ord_ctn_sh_date");
            entity.lastOrdCtnShEmp       = row.IsNull("last_ord_ctn_sh_emp") ? string.Empty : row.Field <string>("last_ord_ctn_sh_emp");
            entity.lastOrdCtnShEmpName   = row.IsNull("last_ord_ctn_sh_emp_name") ? string.Empty : row.Field <string>("last_ord_ctn_sh_emp_name");
            entity.orderIsAZeroShip      = row.Field <bool>("order_is_a_zero_ship");
            entity.lastProductRcvDate    = row.IsNull("last_product_rcv_date") ? string.Empty : row.Field <string>("last_product_rcv_date");
            entity.lastProductRcvEmp     = row.IsNull("last_product_rcv_emp") ? string.Empty : row.Field <string>("last_product_rcv_emp");
            entity.lastProductRcvEmpName = row.IsNull("last_product_rcv_emp_name") ? string.Empty : row.Field <string>("last_product_rcv_emp_name");
            entity.userfield             = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }