Esempio n. 1
0
        /// <summary>
        /// 对于有项目列表的,自动进行过滤
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FpEnter_EditChange(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
        {
            try
            {
                Neusoft.FrameWork.WinForms.Controls.NeuListBoxPopup current = this.GetCurrentList(this.ActiveSheet,
                                                                                                  this.ActiveSheet.ActiveColumnIndex);

                if (current == null)
                {
                    return;
                }

                string Text = e.EditingControl.Text.Trim();

                current.Filter(Text);

                this.ActiveSheet.SetTag(this.ActiveSheet.ActiveRowIndex, this.ActiveSheet.ActiveColumnIndex, null);

                if (current.Visible == false)
                {
                    current.Visible = true;
                }
            }
            catch { }
        }
Esempio n. 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void fpSpread1_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
 {
     if (MessageBox.Show("确认要删除吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
     {
         this.fpSpread1.ActiveSheet.Rows.Remove(e.Row, 1);
         DelImg(dtImage.Rows[e.Row]["ImgID"].ToString());
         dtImage.Rows.RemoveAt(e.Row);
     }
 }
 private void fpSpead1_EditChange(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
 {
     if (e.Column == 2)
     {
         string text = fpSpead1_Sheet1.ActiveCell.Text;
         lbQuitPayMode.Filter(text);
         if (!lbQuitPayMode.Visible)
         {
             lbQuitPayMode.Visible = true;
         }
     }
 }
Esempio n. 4
0
        private void fpSpread1_EditChange(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
        {
            if (e.Column >= 2 && e.Column <= 8)
            {
                string text = fpSpread1_Sheet1.ActiveCell.Text;
                fpSpread1_Sheet1.Cells[e.Row, e.Column].Tag = null;

                this.lbType.Filter(text.Trim());
                if (this.panelList.Visible == false)
                {
                    this.panelList.Visible = true;
                }
            }
        }
Esempio n. 5
0
        private void fpSpread1_EditChange(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
        {
            //this.ParentForm.Text = "EditChange";
            if (_control != null)
            {
                _control.BringToFront();
                _control.Show();

                IFpInputable _editor = _control as IFpInputable;
                if (_editor != null)
                {
                    try
                    {
                        _editor.Filter(e.EditingControl.Text);
                    }
                    catch {}
                }
            }
        }
        /// <summary>
        /// 当单元格中的数据变化时触发

        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void fpEnter1_EditChange(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
        {
            //筛选数据


            try
            {
                if (e.Column == 1)
                {
                    if (this.ucDiagnose1.Visible == false)
                    {
                        this.ucDiagnose1.Visible = true;
                    }
                    this.ucDiagnose1.Filter(fpEnter1_Sheet1.ActiveCell.Text);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Esempio n. 7
0
        protected override void OnEditChange(FarPoint.Win.Spread.EditorNotifyEventArgs e)
        {
            if (this.phaListEnabled && this.ucItemList1 != null)
            {
                if (e.Column == this.phaListColumnIndex && this.ucItemList1 != null)
                {
                    this.SetListLocation();

                    this.ucItemList1.BringToFront();
                    if (!this.ucItemList1.Visible)
                    {
                        this.ucItemList1.Visible = true;
                    }

                    this.ucItemList1.Filter(this.ActiveSheet.ActiveCell.Text);
                }
            }
            if (this.listBoxEnabled && this.Lists != null && this.Lists.Count > 0)
            {
                if (this.JudgeListRow(e.Row))
                {
                    string str    = this.ActiveSheet.SheetName + e.Column.ToString();
                    int    iIndex = this.GetListIndex(str);
                    if (iIndex != -1)
                    {
                        Neusoft.FrameWork.WinForms.Controls.PopUpListBox current = null;
                        current = this.Lists[iIndex] as Neusoft.FrameWork.WinForms.Controls.PopUpListBox;
                        if (current != null)
                        {
                            current.Filter(e.EditingControl.Text.Trim());
                            if (current.Visible == false)
                            {
                                current.Visible = true;
                            }
                        }
                    }
                }
            }
            base.OnEditChange(e);
        }
Esempio n. 8
0
        private void fpView_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
        {
            try
            {
                eItemType[]    itemTypeEnum = { eItemType.All };
                ItemFindDialog dialog       = new ItemFindDialog(eSqlOperator.Equal, itemTypeEnum);
                dialog.ShowDialog(this);
                if (dialog.IsSelected)
                {
                    #region validateion
                    int           iRow          = shtView.ActiveRowIndex;
                    List <string> strItemCDList = new List <string>();
                    for (int i = 0; i < shtView.Rows.Count; i++)
                    {
                        if (i != iRow)
                        {
                            strItemCDList.Add(Convert.ToString(shtView.Cells[i, (int)eColumn.ITEM_CD].Value));
                        }
                    }
                    ValidateException.ThrowErrorItem(PurchaseOrderEntryValidation.CheckDupItem(dialog.SelectedItem.ITEM_CD, strItemCDList));
                    #endregion

                    shtView.Cells[shtView.ActiveRowIndex, (int)eColumn.ITEM_CD].Value   = dialog.SelectedItem.ITEM_CD.ToString();
                    shtView.Cells[shtView.ActiveRowIndex, (int)eColumn.ITEM_DESC].Value = dialog.SelectedItem.ITEM_DESC.ToString();
                }
            }
            catch (BusinessException err)
            {
                MessageDialog.ShowBusiness(this, err.Error.Message);
                err.Error.FocusOnControl();
            }
            catch (ValidateException err)
            {
                MessageDialog.ShowBusiness(this, err.ErrorResults[0].Message);
                err.ErrorResults[0].FocusOnControl();
            }
        }
Esempio n. 9
0
 private void fpSpread1_ComboSelChange(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
 {
     //this.ParentForm.Text = "ComboSelChange";
 }