示例#1
0
        /// <summary>
        /// 新增按钮事件
        /// </summary>
        private void btnNew_Click(object sender, EventArgs e)
        {
            try
            {
                DataRow baseRow = TableQuotationBaseInfo.NewRow();
                TableQuotationBaseInfo.Rows.Add(baseRow);
                bindingSource_BaseInfo.MoveLast();

                ColumnView headView = (ColumnView)gridControlQuotation.FocusedView;
                gridViewQuotation.FocusedRowHandle = headView.FocusedRowHandle;

                TableCORInfo.Rows.Clear();
                PageCORInfo.PageVisible            = false;
                xtraTabBottom.SelectedTabPageIndex = 0;

                TableQuotationPriceInfo.Clear();
                //gridViewQuotationPriceInfo.AddNewRow();
                DataRow priceRow = TableQuotationPriceInfo.NewRow();
                TableQuotationPriceInfo.Rows.Add(priceRow);
                FocusedListView(false, "CurrencyCate", gridViewQuotationPriceInfo.GetFocusedDataSourceRowIndex());
                gridViewQuotationPriceInfo.RefreshData();
                Set_ButtonEditGrid_State(false);
                textRFQNO.Focus();
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--新增按钮事件错误。", ex);
            }
        }
示例#2
0
        /// <summary>
        /// 新增按钮事件
        /// </summary>
        private void btnNew_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FrmMainDAO.QueryUserButtonPower(this.Name, this.Text, sender, true))
                {
                    return;
                }

                TableQuotationBaseInfo.Rows.Clear();
                DataRow baseRow = TableQuotationBaseInfo.NewRow();
                TableQuotationBaseInfo.Rows.Add(baseRow);
                bindingSource_BaseInfo.MoveLast();

                TableQuotationPriceInfo.Clear();
                //gridViewQuotationPriceInfo.AddNewRow();
                DataRow priceRow = TableQuotationPriceInfo.NewRow();
                TableQuotationPriceInfo.Rows.Add(priceRow);
                FocusedListView(false, "CurrencyCate", gridViewQuotationPriceInfo.GetFocusedDataSourceRowIndex());
                gridViewQuotationPriceInfo.RefreshData();
                Set_ButtonEditGrid_State(false);
                textRFQNO.Focus();
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--新增按钮事件错误。", ex);
            }
        }