Esempio n. 1
0
        private void AddProduct(Product product, double quantity)
        {
            var ticketline = new TicketLine();

            //--populate ticketline with product
            ticketline.ProductId   = product.Id;
            ticketline.ItemName    = product.Name;
            ticketline.ItemPrice   = product.UnitPrice;
            ticketline.Quantity    = quantity;
            ticketline.TotalAmount = product.UnitPrice * quantity;
            ticketlineBindingSource.Add(ticketline);
            ItemTenderGrid.DataSource = ticketlineBindingSource;
            ticketlineBindingSource.MoveLast();
        }
Esempio n. 2
0
        void Module_Edit(enuEdit enuNew_Edit)
        {
            if (bdsModule.Position < 0 && enuNew_Edit == enuEdit.Edit)
            {
                return;
            }

            //Copy hang hien tai
            if (bdsModule.Position >= 0)
            {
                Common.CopyDataRow(((DataRowView)bdsModule.Current).Row, ref drModule);
            }
            else
            {
                drModule = dtModule.NewRow();
            }

            frmModule_Edit frmEdit = new frmModule_Edit();

            frmEdit.Load(enuNew_Edit, drModule);

            //Accept
            if (frmEdit.isAccept)
            {
                if (enuNew_Edit == enuEdit.New)
                {
                    if (bdsModule.Position >= 0)
                    {
                        dtModule.ImportRow(drModule);
                    }
                    else
                    {
                        dtModule.Rows.Add(drModule);
                    }

                    bdsModule.MoveLast();
                }
                else
                {
                    Common.CopyDataRow(drModule, ((DataRowView)bdsModule.Current).Row);
                }

                dtModule.AcceptChanges();
            }
            else
            {
                dtModule.RejectChanges();
            }
        }
Esempio n. 3
0
        /// <summary>
        /// 新增按钮事件
        /// </summary>
        public void btnNew_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FrmMainDAO.QueryUserButtonPower(this.ParentForm.Name, this.Text, sender, true))
                {
                    return;
                }

                if (NewBefore != null)
                {
                    if (!NewBefore())
                    {
                        return;
                    }
                }

                DataRow dr = masterDataSet.Tables[0].NewRow();
                if (DataRowInsertBottom)
                {
                    masterDataSet.Tables[0].Rows.Add(dr);
                    masterBindingSource.MoveLast();
                }
                else
                {
                    masterDataSet.Tables[0].Rows.InsertAt(dr, 0);
                    masterBindingSource.MoveFirst();
                }

                if (NewAfter != null)
                {
                    NewAfter();
                }

                newState = true;
                Set_Button_State(false);
                Set_EditZone_ControlReadOnly(false);
                pnlButton.Focus();
                if (masterEditPanel != null)
                {
                    masterEditPanel.SelectNextControl(null, true, true, true, true);
                }
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--新增按钮事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + f.tsmiXzansj.Text, ex);
            }
        }
Esempio n. 4
0
        private void bindingNavigatorAddNewItem2_Click(object sender, EventArgs e)
        {
            // save current changes prior to adding new elements
            if (innerControl != null)
            {
                innerControl.CommitChanges();
            }
            if (Element != null)
            {
                var bytes = new byte[0];
                switch (Element.type)
                {
                case ElementValueType.SByte:
                case ElementValueType.Byte:
                case ElementValueType.String:
                case ElementValueType.LString:
                    bytes = new byte[1];
                    break;

                case ElementValueType.Float:
                case ElementValueType.Str4:
                case ElementValueType.FormID:
                case ElementValueType.UInt:
                case ElementValueType.Int:
                    bytes = new byte[4];
                    break;

                case ElementValueType.Short:
                case ElementValueType.UShort:
                case ElementValueType.BString:
                    bytes = new byte[2];
                    break;
                }
                elements.Add(new ArraySegment <byte>(bytes));
            }
            else
            {
                elements.Add(default(ArraySegment <byte>));
            }
            try
            {
                inUpdatePosition = true;
                bs.MoveLast();
            }
            finally
            {
                inUpdatePosition = false;
            }
        }
Esempio n. 5
0
        private void BOT_NUEVO_Click(object sender, EventArgs e)
        {
            //botones del barra de herramientas.
            OpcionesMenu(1);
            //preparar los controles mode ADD
            Opcionesforms(1);
            DataRow dr = ds.Tables["dtsupply"].NewRow();

            dr["anulado"]         = false;
            dr["unidad_master_1"] = false;
            dr["unidad_master_2"] = false;
            ds.Tables["dtsupply"].Rows.Add(dr);
            bs.MoveLast();
            EditMode = 1;
        }
        private void addPlayerButton_Click(object sender, EventArgs e)
        {
            PlayerDataGridAdapter adapter = new PlayerDataGridAdapter(new PlayerComponent(), playerList);

            // Default Values
            adapter.RaceMember  = "Human";
            adapter.AddedMember = true;
            adapter.GoldMember  = 100;
            adapter.WoodMember  = 100;
            adapter.MetalMember = 100;
            source.Add(adapter);
            // Move Focus to added Player
            source.MoveLast();
            uiPlayerList.Focus();
        }
Esempio n. 7
0
        private void RegisterBindingSourceOnAddingNew(object sender, AddingNewEventArgs e)
        {
            if (_registerBindingSource.List.Count >= 1)
            {
                return;
            }
            DataView view = _registerBindingSource.List as DataView;

            DataRowView row = view.AddNew();

            row["LandID"]     = 1;
            row["CustomerID"] = ((DataRowView)_customerBindingSource.Current)[0];
            e.NewObject       = (object)row;
            _registerBindingSource.MoveLast();
        }
Esempio n. 8
0
 private void ClickMoveLast(object sender, EventArgs e)
 {
     try
     {
         if (CurrentEntityIsValid())
         {
             BindingSource.MoveLast();
             ConfigureUI();
         }
     }
     catch (Exception ex)
     {
         ShowException(ex);
     }
 }
        /// <summary>
        /// Setup new DataRow with some values
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void _bindingSource_AddingNew(object sender, AddingNewEventArgs e)
        {
            DataView dataView = _bindingSource.List as DataView;

            // ReSharper disable once PossibleNullReferenceException
            DataRowView dataRowView = dataView.AddNew();

            dataRowView["PartName"] = "Just added";
            dataRowView["Quantity"] = 10;
            dataRowView["Cost"]     = 1.6M;

            e.NewObject = dataRowView;

            _bindingSource.MoveLast();
        }
Esempio n. 10
0
        virtual public void undo()
        {
            // insert lai data o vi tri cuoi (do k biet insert lai dung vi tri)
            binding.AddNew();
            DataRowView row = (DataRowView)binding.Current;

            for (int i = 0; i < data.Length; i++)
            {
                row[i] = data[i];
            }

            binding.EndEdit();
            binding.ResetCurrentItem();
            binding.MoveLast(); // di den vi tri vua insert lai
        }
Esempio n. 11
0
        private void RecordMoveEvent(object sender, EventArgs e)
        {
            Button btn = sender as Button;

            switch (btn.Text)
            {
            case "  第一筆": bs.MoveFirst(); break;

            case "  上一筆": bs.MovePrevious(); break;

            case "  下一筆": bs.MoveNext(); break;

            case "   最後一筆": bs.MoveLast(); break;
            }
            ShowRecordStuts();
        }
Esempio n. 12
0
        private void AddressBindingSourceOnAddingNew(object sender, AddingNewEventArgs addingNewEventArgs)
        {
            if (_addressBindingSource.List.Count >= 1)
            {
                return;
            }
            DataView view = _addressBindingSource.List as DataView;

            DataRowView row = view.AddNew();

            row["City"]                  = "Славянск";
            row["AdminDivisionID"]       = 5;
            row["CustomerID"]            = ((DataRowView)_customerBindingSource.Current)[0];
            addingNewEventArgs.NewObject = (object)row;
            _addressBindingSource.MoveLast();
        }
Esempio n. 13
0
        private void NewSaleItem()
        {
            SaleItem         item            = new SaleItem();
            frmEditSalesItem frmEditSaleItem = new frmEditSalesItem(item);

            if (frmEditSaleItem.ShowDialog() == DialogResult.OK)
            {
                bsSaleItems.Add(item);
                bsSaleItems.MoveLast();
                dgvSaleItems.Invalidate();
            }
            else
            {
                bsSaleItems.Remove(item);
            }
        }
Esempio n. 14
0
        private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
        {
            if (dgvTonGiao.RowCount == 0)
            {
                bindingNavigatorDeleteItem.Enabled = true;
            }

            BindingSource bindingSource = bindingNavigatorTonGiao.BindingSource;
            DataTable     dataTable     = (DataTable)bindingSource.DataSource;
            DataRow       dataRow       = dataTable.NewRow();

            dataRow["MaTonGiao"]  = "";
            dataRow["TenTonGiao"] = "";

            dataTable.Rows.Add(dataRow);
            bindingSource.MoveLast();
        }
Esempio n. 15
0
 private void fPhieuGiaohang_Load(object sender, EventArgs e)
 {
     if (_db.FAction == FormAction.New)
     {
         bs.MoveLast();
     }
     this.gridControl1.DataMember = _db.ds.Relations[0].RelationName;
     this.repositoryItemGridLookUpEdit1.DataSource = _db.dmVT;
     this.repositoryItemGridLookUpEdit2.DataSource = _db.dmDVT;
     BindingData();
     dxErrorProvider1.DataSource = bs;
     cMaXe.LostFocus            += new EventHandler(cMaXe_LostFocus);
     cMaKH.LostFocus            += new EventHandler(cMaXe_LostFocus);
     cOngBa.Leave += new EventHandler(cOngBa_Leave);
     this.KeyDown += new KeyEventHandler(fPhieuGiaohangdt_KeyDown);
     this.gridControl1.KeyDown += new KeyEventHandler(gridControl1_KeyDown);
 }
Esempio n. 16
0
        private void btSelect_Click(object sender, EventArgs e)
        {
            DataRow dr = _data.dt.NewRow();

            _data.dt.Rows.Add(dr);
            dr["MaPhong"] = (bsDSPhongTrong.Current as DataRowView).Row["MaPhong"];
            if (_data.tDSPhong.Columns.Count > 0)
            {
                DataRow[] ldr = _data.tDSPhong.Select("MaLoaiPhong='" + (bsDSPhongTrong.Current as DataRowView).Row["MaLoaiPhong"].ToString() + "'");
                if (ldr.Length > 0)
                {
                    dr["GiaPhong"] = ldr[0]["GiaPhong"];
                }
            }
            bsDSPhongTrong.RemoveCurrent();
            bsChkin.MoveLast();
        }
Esempio n. 17
0
        private void Last_Click(object sender, EventArgs e)
        {
            o.conex();
            SqlCommand    cmd = new SqlCommand("Select * from Voitures order by Marque", o.cn);
            SqlDataReader dr  = cmd.ExecuteReader();
            DataTable     dt  = new DataTable();

            dt.Load(dr);
            bs.DataSource = dt;
            o.Deconex();
            bs.MoveLast();
            i  = textBox4.Text.IndexOf(" ");
            hh = textBox4.Text.Substring(0, i);
            numericUpDown2.Value = Convert.ToInt32(hh);

            comboBox4.SelectedIndex = -1;
        }
Esempio n. 18
0
        private void bindingNavigatorMoveLastItem_Click(object sender, EventArgs e)
        {
            bs.EndEdit();

            if (IsEmptyRecord(CurrentStudy))
            {
                bs.RemoveCurrent();
                return;
            }

            if (SaveRecord() == 1)
            {
                MessageBox.Show("Unable to save current record. Ensure all fields are filled.");
                return;
            }
            bs.MoveLast();
        }
Esempio n. 19
0
        private void BOT_NUEVO_Click(object sender, EventArgs e)
        {
            BOT_PRIMERO.Enabled          = false;
            BOT_SIGUIENTE.Enabled        = false;
            BOT_ULTIMO.Enabled           = false;
            BOT_ANTERIOR.Enabled         = false;
            BOT_NUEVO.Enabled            = false;
            BOT_MODIFICAR.Enabled        = false;
            BOT_BUSCAR.Enabled           = false;
            BOT_GRABAR.Enabled           = true;
            BOT_CANCELAR.Enabled         = true;
            txt_product_id.ReadOnly      = false;
            txt_product_name.ReadOnly    = false;
            txt_descrip_product.ReadOnly = false;
            txt_code_bar.ReadOnly        = false;
            txt_precio.ReadOnly          = false;
            txt_referencia.ReadOnly      = false;
            txt_ratio.ReadOnly           = false;
            cbo_category.Enabled         = true;
            RAD_MASTER_ROLLS.Enabled     = true;
            RAD_RESMAS.Enabled           = true;
            RAD_GRAPHICS.Enabled         = true;
            RAD_MASTER_ROLLS.Checked     = false;
            RAD_RESMAS.Checked           = false;
            RAD_GRAPHICS.Checked         = false;
            RAD_ROLLO_CORTADO.Checked    = false;
            CHK_ANULADO.Checked          = false;
            CHK_ANULADO.DataBindings.Clear();
            RAD_MASTER_ROLLS.DataBindings.Clear();
            RAD_ROLLO_CORTADO.DataBindings.Clear();
            RAD_RESMAS.DataBindings.Clear();
            RAD_GRAPHICS.DataBindings.Clear();
            DataRow dr = ds.Tables["dtproducto"].NewRow();

            dr["anulado"]       = false;
            dr["MasterRolls"]   = false;
            dr["rollo_cortado"] = false;
            dr["Resmas"]        = false;
            dr["graphics"]      = false;
            dr["precio"]        = 0;
            dr["ratio"]         = 0;
            ds.Tables["dtproducto"].Rows.Add(dr);
            bs.MoveLast();
            EditMode = 1;
        }
Esempio n. 20
0
        private void ButtonAdd_Click(object sender, EventArgs e)
        {
            //курсор на последнего
            _bsEmployees.MoveLast();
            //след.порядковый номер
            int number = (_bsEmployees.Current as Employee).OrderNumber + 1;

            //добавляем нового
            _bsEmployees.Add(new Employee(0)
            {
                OrderNumber = number
            });
            //выделяем его
            _bsEmployees.MoveNext();
            SetCurrentEmployee();
            //выделяем имя для редактирования
            _textBoxFirstName.Focus();
        }
Esempio n. 21
0
        public void AddNew()
        {
            try
            {
                BsUnit.AllowNew = true;
                BsUnit.AddNew();
                BsUnit.MoveLast();
                CurrencyManager cm = (CurrencyManager)this.BindingContext[BsUnit];
                cm.Refresh();

                ClsUtility._IClsUtility.FormMode = ClsUtility.enmFormMode.AddMode;
                SetFormMode(ClsUtility.enmFormMode.AddMode);
            }
            catch (Exception ex)
            {
                ClsMessage._IClsMessage.ProjectExceptionMessage(ex);
            }
        }
Esempio n. 22
0
 private void buttonSUPPRIMER_Click(object sender, EventArgs e)
 {
     try
     {
         if (bs.Current != null && MessageBox.Show("Confirmer suppression ?", "Suppression d'article", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
         {
             bs.RemoveCurrent();
             bs.EndEdit();
             bs.MoveLast();
             dt_lg_commande.AcceptChanges();
             calculerTotalCmd();
         }
     }
     catch (Exception er)
     {
         MessageBox.Show(er.Message, CLIENT_APP_PARAM.Fenetre_principale.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Esempio n. 23
0
        private void BtnAddNew_Click(object sender, EventArgs e)
        {
            try
            {
                BsClass.AllowNew = true;
                BsClass.AddNew();
                BsClass.MoveLast();
                CurrencyManager cm = (CurrencyManager)this.BindingContext[BsClass];
                cm.Refresh();

                ClsUtility._IClsUtility.FormMode = ClsUtility.enmFormMode.AddMode;
                SetFormMode(ClsUtility.enmFormMode.AddMode);
            }
            catch (Exception ex)
            {
                ClsMessage._IClsMessage.ProjectExceptionMessage(ex);
            }
        }
Esempio n. 24
0
 private void btnGhi_Click(object sender, EventArgs e)
 {
     if (them == true)
     {
         using (WebClient wc = new WebClient())
         {
             wc.Encoding = Encoding.UTF8;
             wc.Headers[HttpRequestHeader.ContentType] = "application/json";
             string diachi = "http://192.168.1.5/QLPhimService/PhimService.svc/themphim";
             Phim   obj    = new Phim {
                 Ten = txtTenPhim.Text, DienVien = txtDienVien.Text, DaoDien = txtDaoDien.Text, DoDai = Convert.ToInt32(txtDoDai.Text), GioiThieu = txtGioiThieu.Text, HangPhim = txtHangSanXuat.Text, NuocSanXuat = txtNuocSanXuat.Text, PhienBan = txtPhienBan.Text, TheLoai = txtTheLoai.Text
             };
             string chuoijson   = JsonConvert.SerializeObject(obj);
             string ketquatrave = wc.UploadString(diachi, "POST", chuoijson);
             bs.Add(obj);
             bs.MoveLast();
             them = false;
             MessageBox.Show(ketquatrave);
         }
     }
     else
     {
         using (WebClient wc = new WebClient())
         {
             wc.Encoding = Encoding.UTF8;
             wc.Headers[HttpRequestHeader.ContentType] = "application/json";
             string diachi  = "http://192.168.1.5/QLPhimService/PhimService.svc/suaphim";
             Phim   current = bs.Current as Phim;
             current.Ten         = txtTenPhim.Text;
             current.DaoDien     = txtDaoDien.Text;
             current.DienVien    = txtDienVien.Text;
             current.DoDai       = Convert.ToInt32(txtDoDai.Text);
             current.GioiThieu   = txtDoDai.Text;
             current.HangPhim    = txtHangSanXuat.Text;
             current.NuocSanXuat = txtNuocSanXuat.Text;
             current.PhienBan    = txtPhienBan.Text;
             current.TheLoai     = txtTheLoai.Text;
             string chuoijson   = JsonConvert.SerializeObject(current);
             string ketquatrave = wc.UploadString(diachi, "PUT", chuoijson);
             bs.EndEdit();
             MessageBox.Show(ketquatrave);
         }
     }
 }
Esempio n. 25
0
        /// <summary>
        /// 【通过商品表的Id获取表中的内容在dgvProductList(dataGridView1)框里面显示】
        /// </summary>
        private void AddNewProductToList()
        {
            //【一】根据商品编号查询商品
            //【1.在数据库中根据商品编号查询商品】
            //objProduct就拿到到所有的商品表内容
            ProdutsModel objProduct = manager2.GetProductWithId(txtProductId.Text.Trim());

            //【2】检查商品是否未查到,如果没有商品临时创建一个商品
            //objProduct如果没有拿到值,则进入
            if (objProduct == null)//商品编号未查到对应的商品信息,要么是临时商品
            {
                //【3】假设是临时商品
                objProduct = new ProdutsModel()
                {
                    ProductName = "暂未提供商品名称",                                  //商品名字
                    ProductId   = txtProductId.Text.Trim(),                    //商品ID
                    UnitPrice   = Convert.ToDecimal(txtUnitPrice.Text.Trim()), //商品单价
                    Discount    = Convert.ToInt32(txtDiscount.Text.Trim())     //商品折扣
                };
            }
            //【3】扫到的商品(就是数据库里面通过Id查到商品)
            else
            {
                //把从数据库获取的, 内容给窗口上的文本框
                txtUnitPrice.Text = objProduct.UnitPrice.ToString();
                txtDiscount.Text  = objProduct.Discount.ToString();
            }
            //【5】根据商品的数量折扣计算小计金额
            objProduct.Quantity = Convert.ToInt32(txtQuantity.Text.Trim());
            objProduct.SubTotal = objProduct.Quantity * objProduct.UnitPrice;
            //【6】如果这个商品有折扣
            if (objProduct.Discount != 0)
            {
                objProduct.SubTotal *= (Convert.ToDecimal(objProduct.Discount) / 10);
            }
            //【7】商品列表序号问题(每次添加序号改变,增加一个)
            objProduct.ProductNo = productList.Count + 1;
            productList.Add(objProduct);
            //【8】添加商品之后应该立刻让最新添加的商品作为选中项
            //bs是缓冲容器的名字,MoveLast()是获取移至列表中的最后一项
            bs.MoveLast();
        }
Esempio n. 26
0
        /// <summary>
        /// It manages the repositioning of the record on a GridView
        /// </summary>
        /// <param name="oViewEditing">editing state of the Form</param>
        /// <param name="BindingSource">BindingSource on the data list</param>
        /// <param name="buttonCaller">Button that calls the move</param>
        /// <remarks></remarks>
        public static void MoveTo(ViewEditing oViewEditing, BindingSource bs, Button buttonCaller, Control ControlToFocus = null)
        {
            try
            {
                if (bs == null || bs.Count == 0)
                {
                    return;
                }

                if (ControlToFocus != null)
                {
                    ControlToFocus.Focus();
                }

                if (oViewEditing.actualStatus != state.view)
                {
                    Display.ShowMessage("You are in " + (oViewEditing.actualStatus == state.edit ? "edit!" : "insert!" + Environment.NewLine + "Save or Cancel " + "before proceeding with the update"));
                    return;
                }

                if (buttonCaller.Name.ToLower().Contains("first"))
                {
                    bs.MoveFirst();
                }
                if (buttonCaller.Name.ToLower().Contains("prev"))
                {
                    bs.MovePrevious();
                }
                if (buttonCaller.Name.ToLower().Contains("next"))
                {
                    bs.MoveNext();
                }
                if (buttonCaller.Name.ToLower().Contains("last"))
                {
                    bs.MoveLast();
                }
            }
            catch (Exception ex)
            {
                Display.ShowError(ex.Message);
            }
        }
Esempio n. 27
0
        private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
        {
            if (dgvPhanCong.RowCount == 0)
            {
                bindingNavigatorDeleteItem.Enabled = true;
            }

            BindingSource bindingSource = bindingNavigatorPhanCong.BindingSource;
            DataTable     dataTable     = (DataTable)bindingSource.DataSource;
            DataRow       dataRow       = dataTable.NewRow();

            dataRow["STT"]        = dgvPhanCong.RowCount + 1;
            dataRow["MaNamHoc"]   = "";
            dataRow["MaLop"]      = "";
            dataRow["MaMonHoc"]   = "";
            dataRow["MaGiaoVien"] = "";

            dataTable.Rows.Add(dataRow);
            bindingSource.MoveLast();
        }
Esempio n. 28
0
        public void RemoveManager()
        {
            if (ManagersBS.Count == 0)
            {
                return;
            }
            int Pos = ManagersBS.Position;

            ManagersBS.RemoveCurrent();
            if (ManagersBS.Count > 0)
            {
                if (Pos >= ManagersBS.Count)
                {
                    ManagersBS.MoveLast();
                }
                else
                {
                    ManagersBS.Position = Pos;
                }
            }
        }
Esempio n. 29
0
        private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
        {
            if (dgvMonHoc.RowCount == 0)
            {
                bindingNavigatorDeleteItem.Enabled = true;
            }

            BindingSource bindingSource = bindingNavigatorMonHoc.BindingSource;
            DataTable     dataTable     = (DataTable)bindingSource.DataSource;
            DataRow       dataRow       = dataTable.NewRow();

            string stt = Utilities.LaySTT(dgvMonHoc.Rows.Count + 1);

            dataRow["MaMonHoc"]  = "MH" + stt;
            dataRow["TenMonHoc"] = "";
            dataRow["SoTiet"]    = 0;
            dataRow["HeSo"]      = 0;

            dataTable.Rows.Add(dataRow);
            bindingSource.MoveLast();
        }
Esempio n. 30
0
        private void add_Button_Click(object sender, EventArgs e)
        {
            using (ScenarioSelectionForm selectionForm = new ScenarioSelectionForm())
            {
                if (selectionForm.ShowDialog() == DialogResult.OK)
                {
                    EnterpriseScenario scenario = null;
                    using (new BusyCursor())
                    {
                        using (EnterpriseTestContext context = new EnterpriseTestContext())
                        {
                            scenario = EnterpriseScenario.Select(context, selectionForm.SelectedScenarioId);
                            _bindingSource.Add(new ScenarioSelectionItem(scenario));
                        }
                    }

                    _bindingSource.MoveLast();
                    SetEstimatedRunTime();
                }
            }
        }