Esempio n. 1
0
        protected void SaveData(object sender, EventArgs e)
        {
            var data           = new List <AssignPicker>();
            var pickerDropDown = int.Parse(PickerDropDown.SelectedValue);
            int orderId        = int.Parse(OrderDropDown.SelectedValue);

            if (pickerDropDown != null && pickerDropDown != 0 && orderId != null && orderId != 0)
            {
                foreach (GridViewRow row in ProductGridView.Rows)
                {
                    var dataItem    = new AssignPicker();
                    var orderListID = row.FindControl("OrderListID") as HiddenField;
                    dataItem.OrderListID = int.Parse(orderListID.Value);
                    var qtypickTextBox   = row.FindControl("qtyPickBox") as TextBox;
                    var pickIssueTextBox = row.FindControl("pickIssueBox") as TextBox;


                    dataItem.PickIssue = pickIssueTextBox.Text;
                    //Add thr new DataItem to the list data to send to the BLL
                    dataItem.QtyPicked = double.Parse(qtypickTextBox.Text);

                    data.Add(dataItem);
                }
            }
            var controller = new OrderListController();

            controller.PickerAssign(orderId, pickerDropDown, data);
        }