Esempio n. 1
0
        private void fpIssueList_ButtonClicked(object sender, EditorNotifyEventArgs e)
        {
            NZString ItemCD = new NZString(null, shtIssueList.Cells[e.Row, (int)eColView.ITEM_CODE].Value);
            NZString LotNo  = new NZString(null, shtIssueList.Cells[e.Row, (int)eColView.LOT_NO].Value);
            NZString LocCD  = new NZString(cboFromLoc, cboFromLoc.SelectedValue);

            if (e.Column == (int)eColView.ITEM_CD_BTN)
            {
                ItemFindDialog dialog = new ItemFindDialog(eSqlOperator.In, null);

                dialog.ShowDialog(this);

                if (dialog.IsSelected)
                {
                    shtIssueList.Cells[e.Row, (int)eColView.ITEM_CODE].Value = dialog.SelectedItem.ITEM_CD.Value;
                    shtIssueList.Cells[e.Row, (int)eColView.ITEM_DESC].Value = dialog.SelectedItem.ITEM_DESC.Value;
                    shtIssueList.Cells[e.Row, (int)eColView.LOT_NO].Value    = null;
                    shtIssueList.Cells[e.Row, (int)eColView.ISSUE_QTY].Value = null;
                }
            }
            else if (e.Column == (int)eColView.LOT_BTN)
            {
                NZString        locCD  = new NZString(null, cboFromLoc.SelectedValue);
                LotNoFindDialog dialog = new LotNoFindDialog(ItemCD, locCD);

                dialog.ShowDialog(this);
                if (dialog.IsSelected)
                {
                    shtIssueList.Cells[e.Row, (int)eColView.LOT_NO].Value = dialog.SelectedLotNo.NVL(string.Empty);
                    LotNo = new NZString(null, shtIssueList.Cells[e.Row, (int)eColView.LOT_NO].Value);
                    shtIssueList.Cells[e.Row, (int)eColView.ONHAND_QTY].Value = GetOnhandQty(ItemCD, LocCD, LotNo);
                    shtIssueList.Cells[e.Row, (int)eColView.ISSUE_QTY].Value  = shtIssueList.Cells[e.Row, (int)eColView.ONHAND_QTY].Value;
                }
            }
        }
Esempio n. 2
0
        private void fpQueryList_ButtonClicked(object sender, EditorNotifyEventArgs e)
        {
            if (e.Column == (int)eCol.Checkbox)
            {
                bool blCheck = Convert.ToBoolean(shtQueryList.Cells[e.Row, (int)eCol.Checkbox].Value);

                if (blCheck)
                {
                    int iMaxPriority = 0;
                    int iPriority    = 0;
                    for (int i = 0; i < shtQueryList.RowCount; i++)
                    {
                        iPriority = 0;
                        iPriority = Convert.ToInt32(shtQueryList.Cells[i, (int)eCol.Priority].Value);

                        if (iPriority > iMaxPriority)
                        {
                            iMaxPriority = iPriority;
                        }
                    }

                    iMaxPriority = (int)(iMaxPriority / 10 * 10) + 10;

                    shtQueryList.Cells[e.Row, (int)eCol.Priority].Value = iMaxPriority;
                }
                else
                {
                    shtQueryList.Cells[e.Row, (int)eCol.Priority].Value = null;
                }
            }
        }
Esempio n. 3
0
        private void fpView_ButtonClicked(object sender, EditorNotifyEventArgs e)
        {
            if (e.Column == (int)eColView.ITEM_CD_BTN)
            {
                ItemFindDialog dialog = null;

                if (chkFilterItem.Checked)
                {
                    //if (cboSupplierCode.ToNZString().IsNull)
                    //{
                    //    ErrorItem error = new ErrorItem(null, TKPMessages.eValidate.VLM0105.ToString(), new object[] { this.lblSupplierCode.Text });
                    //    MessageDialog.ShowBusiness(this, error.Message);

                    //    return;
                    //}

                    dialog = new ItemFindDialog(eSqlOperator.In, null, cboSupplierCode.ToNZString(), DataDefine.eDealingType.Supplier);
                }
                else
                {
                    dialog = new ItemFindDialog(eSqlOperator.In, null);
                }
                dialog.ShowDialog(this);

                if (dialog.IsSelected)
                {
                    LoadItemIntoRow(e.Row, dialog.SelectedItem.ITEM_CD);
                }
            }
        }
Esempio n. 4
0
        /// <summary>
        /// 对于有项目列表的,自动进行过滤
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FpEnter_EditChange(object sender, EditorNotifyEventArgs e)
        {
            try
            {
                Neusoft.FrameWork.WinForms.Controls.PopUpListBox 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. 5
0
        private void fpInterfaces_ButtonClicked(object sender, EditorNotifyEventArgs e)
        {
            DialogResult dr = openFileDialog.ShowDialog();

            if (dr == DialogResult.OK)
            {
                string      dllName  = openFileDialog.SafeFileName;
                List <Type> typeList = null;
                typeList = ReflectionManager.GetTypesByInterfaceWithOutAbstract(dllName, InterfaceType, TypeOfType.Class);
                if (typeList == null || typeList.Count == 0)
                {
                    return;
                }
                SetHyperLinkCellTypeCellText(fpInterfaces_Sheet1.Cells[e.Row, e.Column], dllName);
                IDatasAskerImplementor iDatasAskerImplementor = fpInterfaces_Sheet1.Rows[e.Row].Tag as IDatasAskerImplementor;
                iDatasAskerImplementor.DllName = dllName;
                string[] types = new string[typeList.Count];
                for (int i = 0; i < typeList.Count; i++)
                {
                    types[i] = typeList[i].FullName;
                }
                comboBoxCellType.Items = types;
                fpInterfaces_Sheet1.Cells[e.Row, 1].CellType = comboBoxCellType.Clone() as FarPoint.Win.Spread.CellType.ComboBoxCellType;
                fpInterfaces_Sheet1.Cells[e.Row, 1].Locked   = false;
            }
        }
Esempio n. 6
0
        private void fpStorage_EditChange(object sender, EditorNotifyEventArgs e)
        {
            Neusoft.FrameWork.Management.DataBaseManger data = new Neusoft.FrameWork.Management.DataBaseManger();
            DateTime date = this.basesetManager.GetDateTimeFromSysDateTime();

            this.fpStorage_Sheet1.Cells[e.Row, 14].Text = ((Neusoft.HISFC.Models.Base.Employee)data.Operator).ID;
            this.fpStorage_Sheet1.Cells[e.Row, 15].Text = date.ToString();
        }
Esempio n. 7
0
 /// <summary>
 /// 选择控件收起事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void neuSpread1_ComboCloseUp(object sender, EditorNotifyEventArgs e)
 {
     if (e.Column == 6)
     {
         this.neuSpread1_Sheet1.SetActiveCell(this.neuSpread1_Sheet1.ActiveRowIndex,
                                              this.neuSpread1_Sheet1.ActiveColumnIndex + 1);
     }
 }
Esempio n. 8
0
 private void TableStatistics_ButtonClicked(object sender, EditorNotifyEventArgs e)
 {
     switch (e.Column)
     {
     case 4:
         SetStatisticsCell(e.Row, e.Column);
         break;
     }
 }
Esempio n. 9
0
        protected override void OnComboDropDown(EditorNotifyEventArgs e)
        {
            if (e.EditingControl == null)
            {
                return;
            }

            base.OnComboDropDown(e);
        }
Esempio n. 10
0
 private void fpSpread2_ButtonClicked(object sender, EditorNotifyEventArgs e)
 {
     if (e.Column == 2 && Convert.ToBoolean(SheetView2.Rows[e.Row].Tag))
     {
         CellSelector cellSelector = new CellSelector(moduleID, "", Guid.Empty);
         if (DialogResult.OK == cellSelector.ShowDialog())
         {
             SheetView2.Cells[e.Row, 1].Value = cellSelector.CellName;
             SheetView2.Cells[e.Row, 1].Tag   = cellSelector.SheetID;
         }
     }
 }
Esempio n. 11
0
 private void fpSpread2_ButtonClicked(object sender, EditorNotifyEventArgs e)
 {
     if (rb_ylj.Checked)
     {
         if (e.Column == 3)
         {
             CellSelector cellSelector = new CellSelector(moduleID, "", Guid.Empty);
             if (DialogResult.OK == cellSelector.ShowDialog())
             {
                 sheetView1.Cells[e.Row, 2].Value = cellSelector.CellName;
                 sheetView1.Cells[e.Row, 2].Tag   = cellSelector.SheetID;
             }
         }
         else if (e.Column == 0)
         {
             sheetView1.Rows.Remove(e.Row, 1);
         }
     }
     else if (rb_wnj.Checked)
     {
         if (e.Column == 0)
         {
             SheetView2.Rows.Remove(e.Row, 1);
         }
         else if (e.Column == 3)
         {
             CellSelector cellSelector = new CellSelector(moduleID, "", Guid.Empty);
             if (DialogResult.OK == cellSelector.ShowDialog())
             {
                 SheetView2.Cells[e.Row, 2].Value = cellSelector.CellName;
                 SheetView2.Cells[e.Row, 2].Tag   = cellSelector.SheetID;
             }
         }
         else if (e.Column == 5)
         {
             CellSelector cellSelector = new CellSelector(moduleID, "", Guid.Empty);
             if (DialogResult.OK == cellSelector.ShowDialog())
             {
                 SheetView2.Cells[e.Row, 4].Value = cellSelector.CellName;
                 SheetView2.Cells[e.Row, 4].Tag   = cellSelector.SheetID;
             }
         }
         else if (e.Column == 7)
         {
             CellSelector cellSelector = new CellSelector(moduleID, "", Guid.Empty);
             if (DialogResult.OK == cellSelector.ShowDialog())
             {
                 SheetView2.Cells[e.Row, 6].Value = cellSelector.CellName;
                 SheetView2.Cells[e.Row, 6].Tag   = cellSelector.SheetID;
             }
         }
     }
 }
Esempio n. 12
0
 private void fpView_ButtonClicked(object sender, EditorNotifyEventArgs e)
 {
     //if ((int)eColumns.EDIT_FLAG == e.Column)
     //{
     //    if (Convert.ToBoolean(shtView.Cells[shtView.ActiveRowIndex, (int)eColumns.EDIT_FLAG].Value) == true)
     //    {
     //        shtView.Cells[shtView.ActiveRowIndex, (int)eColumns.Shipment].Value = shtView.Cells[shtView.ActiveRowIndex, (int)eColumns.ON_HAND_QTY].Value;
     //    }
     //    else
     //        shtView.Cells[shtView.ActiveRowIndex, (int)eColumns.Shipment].Value = null;
     //}
 }
Esempio n. 13
0
 private void fpInterfaces_EditChange(object sender, EditorNotifyEventArgs e)
 {
     if (e.Column == 1)
     {
         ISystemValueImplementor iSystemValueImplementor = fpInterfaces_Sheet1.Rows[e.Row].Tag as ISystemValueImplementor;
         iSystemValueImplementor.ClassName = fpInterfaces_Sheet1.Cells[e.Row, 1].Text;
         if (!interfaceSetting.ISystemValueImplementorList.Contains(iSystemValueImplementor))
         {
             interfaceSetting.ISystemValueImplementorList.Add(iSystemValueImplementor);
         }
         SendInterfaceToGlobalValue();
     }
 }
Esempio n. 14
0
        private void fpView_ButtonClicked(object sender, EditorNotifyEventArgs e)
        {
            //if ((int)eColumns.EDIT_FLAG == e.Column)
            //{
            //    if (Convert.ToBoolean(shtView.Cells[shtView.ActiveRowIndex, (int)eColumns.EDIT_FLAG].Value) == true)
            //    {
            //        shtView.Cells[shtView.ActiveRowIndex, (int)eColumns.ONHAND_QTY].Value = shtView.Cells[shtView.ActiveRowIndex, (int)eColumns.ONHAND_QTY].Value;
            //    }
            //    else
            //        shtView.Cells[shtView.ActiveRowIndex, (int)eColumns.ONHAND_QTY].Value = null;
            //}
            if (shtView.Cells[e.Row, e.Column].Locked)
            {
                //shtView.Cells[e.Row, e.Column].Value = false;
            }
            else if ((int)eColumns.CHECK_FLAG == e.Column && !shtView.Cells[e.Row, e.Column].Locked)
            {
                string pack_no = shtView.GetValue(e.Row, (int)eColumns.PACK_NO).ToString();
                //bool CheckValue = Convert.ToBoolean(shtView.Cells[e.Row, (int)eColumns.EDIT_FLAG].Value);

                //for (int i = 0; i < shtView.RowCount; i++)
                //{
                //    if (pack_no == shtView.GetValue(i, (int)eColumns.PACK_NO).ToString())
                //    {
                //        shtView.Cells[i, (int)eColumns.EDIT_FLAG].Value = CheckValue;
                //    }
                //}

                bool      isChecked = Convert.ToBoolean(shtView.Cells[e.Row, (int)eColumns.CHECK_FLAG].Value);
                DataRow[] rows      = m_Data.Select(ActualOnhandViewDTO.eColumns.PACK_NO.ToString() + "='" + pack_no + "'");

                foreach (DataRow dr in rows)
                {
                    if (isChecked)
                    {
                        dr[CONST_COLUMN_NAME_CHECK_FLAG] = 1;
                    }
                    else
                    {
                        dr[CONST_COLUMN_NAME_CHECK_FLAG] = 0;
                    }
                }

                m_Data.AcceptChanges();

                this.shtView.DataSource = m_Data;
            }


            CalTotatValue();
        }
Esempio n. 15
0
        //private void fpView_CellClick(object sender, CellClickEventArgs e)
        //{
        //    try
        //    {
        //        if (e.Column == (int)eColView.CHECKBOX)
        //        {
        //            int check = Convert.ToInt32(shtView.Cells[e.Row, (int)eColView.CHECKBOX].Value);
        //            if (check == 0)
        //            {
        //                string checklot = (NZString)shtView.Cells[e.Row, (int)eColView.PACK_NO].Text;
        //                string iPriority;
        //                for (int i = 0; i < shtView.RowCount; i++)
        //                {
        //                    iPriority = (NZString)shtView.Cells[i, (int)eColView.PACK_NO].Text;

        //                    if (iPriority == checklot)
        //                    {
        //                        shtView.Cells[i, (int)eColView.CHECKBOX].Value = 1;
        //                    }
        //                }

        //            }

        //            else if (check == 1)
        //            {
        //                string checklot = (NZString)shtView.Cells[e.Row, (int)eColView.PACK_NO].Text;
        //                string iPriority;
        //                for (int i = 0; i < shtView.RowCount; i++)
        //                {
        //                    iPriority = (NZString)shtView.Cells[i, (int)eColView.PACK_NO].Text;

        //                    if (iPriority == checklot)
        //                    {
        //                        shtView.Cells[i, (int)eColView.CHECKBOX].Value = 0;
        //                    }
        //                }

        //            }

        //        }
        //    }
        //    catch (Exception ex)
        //    {
        //        MessageDialog.ShowBusiness(this, ex.Message);
        //    }
        //}

        private void fpView_ButtonClicked(object sender, EditorNotifyEventArgs e)
        {
            try
            {
                if (e.Column == (int)eColView.CHECKBOX)
                {
                    Boolean check = Convert.ToBoolean(shtView.Cells[e.Row, (int)eColView.CHECKBOX].Value);

                    if (check == true)
                    {
                        string checklot = (NZString)shtView.Cells[e.Row, (int)eColView.PACK_NO].Text;
                        string iPriority;
                        for (int i = 0; i < shtView.RowCount; i++)
                        {
                            iPriority = (NZString)shtView.Cells[i, (int)eColView.PACK_NO].Text;

                            if (iPriority == checklot)
                            {
                                shtView.Cells[i, (int)eColView.CHECKBOX].Value = true;
                            }
                        }
                    }

                    else if (check == false)
                    {
                        string checklot = (NZString)shtView.Cells[e.Row, (int)eColView.PACK_NO].Text;
                        string iPriority;
                        for (int i = 0; i < shtView.RowCount; i++)
                        {
                            iPriority = (NZString)shtView.Cells[i, (int)eColView.PACK_NO].Text;

                            if (iPriority == checklot)
                            {
                                shtView.Cells[i, (int)eColView.CHECKBOX].Value = false;
                            }
                        }
                    }

                    CalculateTotalQty();
                }
            }
            catch (Exception ex)
            {
                MessageDialog.ShowBusiness(this, ex.Message);
            }
        }
Esempio n. 16
0
        private void FpSpread_EditChange(object sender, EditorNotifyEventArgs e)
        {
            Int32 i = FpSpread_Info.ActiveRowIndex;

            object Temperature1   = null;
            object Temperature2   = null;
            object Temperature3   = null;
            float  TemperatureAvg = 0;
            int    iCount         = 0;
            float  TemperatureSum = 0;

            Temperature1 = FpSpread_Info.Cells[i, 3].Value;
            if (Temperature1 != null && !string.IsNullOrEmpty(Temperature1.ToString()))
            {
                iCount++;
                TemperatureSum += float.Parse(Temperature1.ToString());
            }
            Temperature2 = FpSpread_Info.Cells[i, 4].Value;
            if (Temperature2 != null && !string.IsNullOrEmpty(Temperature2.ToString()))
            {
                iCount++;
                TemperatureSum += float.Parse(Temperature2.ToString());
            }
            Temperature3 = FpSpread_Info.Cells[i, 5].Value;
            if (Temperature3 != null && !string.IsNullOrEmpty(Temperature3.ToString()))
            {
                iCount++;
                TemperatureSum += float.Parse(Temperature3.ToString());
            }
            //TemperatureAvg = FpSpread_Info.Cells[i, 6].Value.ToString();
            if (iCount > 0 && iCount == 3)
            {
                TemperatureAvg = TemperatureSum / iCount;
            }
            else
            {
                TemperatureAvg = 0;
            }
            if (TemperatureAvg < 0)
            {
                TemperatureAvg = 0;
            }
            FpSpread_Info.Cells[i, 6].Value  = TemperatureAvg.ToString("F1");
            FpSpread_Info.Cells[i, 10].Value = 1;
        }
Esempio n. 17
0
        /// <summary>
        ///     farpoint中checkbox选中对全选反选的影响
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void fpStopLineInfo_ButtonClicked(object sender, EditorNotifyEventArgs e)
        {
            if (e.EditingControl is FpCheckBox)
            {
                var fpChk = (FpCheckBox)e.EditingControl;
                if (fpChk.Checked)
                {
                    // 保存索引号
                    if (!_htSelIdxs.Contains(e.Row))
                    {
                        _htSelIdxs.Add(e.Row, true);

                        // 点击每条记录知道全部选中的情况下,全选/全不选checkbox设为选中
                        if (_htSelIdxs.Count == _checkCount)
                        {
                            // 全选/全不选checkbox设为选中
                            chkSelAll.Checked = true;
                        }
                    }

                    _checkCount++;
                }
                else
                {
                    // 移除索引号
                    _htSelIdxs.Remove(e.Row);

                    // 全选/全不选checkbox设为未选中
                    chkSelAll.Checked = false;

                    _checkCount--;
                }
            }

            if (_checkCount == _rowsCount)
            {
                chkSelAll.Checked = true;
            }
            else
            {
                chkSelAll.Checked = false;
            }

            setButtenEnable();
        }
Esempio n. 18
0
 private void fpInterfaces_EditChange(object sender, EditorNotifyEventArgs e)
 {
     if (e.Column == 1)
     {
         IDatasAskerImplementor iDatasAskerImplementor = fpInterfaces_Sheet1.Rows[e.Row].Tag as IDatasAskerImplementor;
         iDatasAskerImplementor.ClassName = fpInterfaces_Sheet1.Cells[e.Row, 1].Text;
         if (!interfaceSetting.IDatasAskerImplementorList.Contains(iDatasAskerImplementor))
         {
             interfaceSetting.IDatasAskerImplementorList.Add(iDatasAskerImplementor);
         }
         fpInterfaces_Sheet1.Cells[e.Row, 1].CellType = comboBoxCellType.Clone() as FarPoint.Win.Spread.CellType.ComboBoxCellType;
         fpInterfaces_Sheet1.Cells[e.Row, 2].Locked   = false;
     }
     else if (e.Column == 2)
     {
         IDatasAskerImplementor iDatasAskerImplementor = fpInterfaces_Sheet1.Rows[e.Row].Tag as IDatasAskerImplementor;
         iDatasAskerImplementor.Value = fpInterfaces_Sheet1.Cells[e.Row, 2].Text;
     }
 }
Esempio n. 19
0
 private void bsprData_ButtonClicked(object sender, EditorNotifyEventArgs e)
 {
     if (alSelect.Count > 0)
     {
         if (!(bool)this.bsprData.GetCellValue(e.Row, 0))
         {
             for (int i = 0; i < alSelect.Count; i++)
             {
                 this.bsprData.ActiveSheet.SetText((int)alSelect.GetByIndex(i), 0, "False");
             }
         }
         else
         {
             for (int i = 0; i < alSelect.Count; i++)
             {
                 this.bsprData.ActiveSheet.SetText((int)alSelect.GetByIndex(i), 0, "True");
             }
         }
     }
     alSelect.Clear();
 }
Esempio n. 20
0
        protected override void OnEditChange(EditorNotifyEventArgs e)
        {
            string _Text;

            //麻醉方式
            if (this.listBoxPopups.ContainsKey(e.Column))
            {
                _Text = this.ActiveSheet.ActiveCell.Text;
                this.listBoxPopups[e.Column].Filter(_Text);

                if (this.listBoxPopups[e.Column].Visible == false)
                {
                    this.listBoxPopups[e.Column].Visible = true;
                }

                this.ActiveSheet.SetTag(e.Row, e.Column, null);
            }


            base.OnEditChange(e);
        }
Esempio n. 21
0
 private void fpPayMode_EditChange(object sender, EditorNotifyEventArgs e)
 {
     if (e.Column == (int)PayModeCols.PayMode)
     {
         string text = fpPayMode_Sheet1.ActiveCell.Text;
         lbPayMode.Filter(text);
         if (!lbPayMode.Visible)
         {
             lbPayMode.Visible = true;
         }
     }
     if (e.Column == (int)PayModeCols.Bank)
     {
         string text = fpPayMode_Sheet1.ActiveCell.Text;
         lbBank.Filter(text);
         if (!lbBank.Visible)
         {
             lbBank.Visible = true;
         }
     }
 }
Esempio n. 22
0
        private void fpSpread1_ButtonClicked(object sender, EditorNotifyEventArgs e)
        {
            if (e.Column == 2)//试验项目
            {
                TestProjectDialog Dialog = new TestProjectDialog();
                if (DialogResult.OK == Dialog.ShowDialog())
                {
                    if (Dialog.SelectedItem != null)
                    {
                        sheetView1.Cells[e.Row, 1].Value = Dialog.SelectedItem.Description.Trim();
                        sheetView1.Cells[e.Row, 1].Tag   = Dialog.SelectedItem.Index;
                    }
                }
            }

            if (e.Column == 5)//龄期变量
            {
                CellSelector cellSelector = new CellSelector(moduleID, "", Guid.Empty);
                if (DialogResult.OK == cellSelector.ShowDialog())
                {
                    sheetView1.Cells[e.Row, 4].Value = cellSelector.CellName;
                    sheetView1.Cells[e.Row, 4].Tag   = cellSelector.SheetID;
                }
            }

            if (e.Column == 7)//验证数据来源
            {
                CellSelector cellSelector = new CellSelector(moduleID, "", Guid.Empty);
                if (DialogResult.OK == cellSelector.ShowDialog())
                {
                    sheetView1.Cells[e.Row, 6].Value = cellSelector.CellName;
                    sheetView1.Cells[e.Row, 6].Tag   = cellSelector.SheetID;
                }
            }

            if (e.Column == 8)//删除
            {
                sheetView1.Rows.Remove(e.Row, 1);
            }
        }
Esempio n. 23
0
        private void bSpread1_ButtonClicked(object sender, EditorNotifyEventArgs e)
        {
            if (e.Column != (int)iColIdx.SELECT)
            {
                return;
            }

            if ((bool)this.bSpread1.GetCellValue(e.Row, (int)iColIdx.SELECT) == true)
            {
                for (int i = 0; i < this.bSpread1.ActiveSheet.RowCount; i++)
                {
                    if (e.Row == i)
                    {
                        if (e.Column == (int)iColIdx.SELECT)
                        {
                            this.bSpread1.ActiveSheet.SetActiveCell(e.Row, 1);
                            continue;
                        }
                    }
                    this.bSpread1.ActiveSheet.Cells[i, (int)iColIdx.SELECT].Value = 0;
                }
            }
        }
Esempio n. 24
0
        /// <summary>
        ///     farpoint的ButtonClicked事件(必须实装)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void fpGasConcentrationProbeDataInfo_ButtonClicked(object sender, EditorNotifyEventArgs e)
        {
            // 判断点击的空间类型是否是.FpCheckBox)
            if (e.EditingControl is FpCheckBox)
            {
                var fpChk = (FpCheckBox)e.EditingControl;
                // 判断是否被选中
                if (fpChk.Checked)
                {
                    // 保存索引号
                    if (!_htSelIdxs.Contains(e.Row))
                    {
                        _htSelIdxs.Add(e.Row, true);

                        // 点击每条记录知道全部选中的情况下,全选/全不选checkbox设为选中
                        if (_htSelIdxs.Count == _iRowCount)
                        {
                            // 全选/全不选checkbox设为选中
                            _chkSelAll.Checked = true;
                        }
                    }
                }
                else
                {
                    // 移除索引号
                    _htSelIdxs.Remove(e.Row);

                    // 全选/全不选checkbox设为未选中
                    _chkSelAll.Checked = false;
                }

                // 如果保存索引号的Hashtable中保存的索引件数是1,则修改按钮设为可用,否则设为不可用
                btnUpdate.Enabled = (_htSelIdxs.Count == 1) ? true : false;
                // 删除按钮
                btnDelete.Enabled = (_htSelIdxs.Count >= 1) ? true : false;
            }
        }
Esempio n. 25
0
 private void fpSpread1_EditChange(object sender, EditorNotifyEventArgs e)
 {
     btn_save.Enabled = true;
 }
Esempio n. 26
0
 private void ss1_EditChange(object sender, EditorNotifyEventArgs e)
 {
     ss1_EditChange(e.Column, e.Row);
 }
Esempio n. 27
0
        private void fpQueryList_ButtonClicked(object sender, EditorNotifyEventArgs e)
        {
            if (e.Column == (int)eCol.Checkbox)
            {
                bool blCheck = Convert.ToBoolean(shtQueryList.Cells[e.Row, (int)eCol.Checkbox].Value);

                if (blCheck)
                {
                    string oType = shtQueryList.Cells[e.Row, (int)eCol.ColumnType].Text;

                    if (eColumnType.String.ToString().Equals(oType))
                    {
                        CtrlUtil.SpreadSetCellLocked(shtQueryList, false, e.Row, (int)eCol.Value1);
                        // Add by Pongthorn S. @ 2012-05-18
                        if (shtQueryList.Cells[e.Row, (int)eCol.ColumnName].Text != DataDefine.MASTER_NO_FIELD_NAME)
                        {
                            CtrlUtil.SpreadSetCellLocked(shtQueryList, true, e.Row, (int)eCol.Value2);
                        }
                        else
                        {
                            CtrlUtil.SpreadSetCellLocked(shtQueryList, false, e.Row, (int)eCol.Value2);
                        }
                    }
                    else
                    {
                        CtrlUtil.SpreadSetCellLocked(shtQueryList, false, e.Row, (int)eCol.Value1);
                        CtrlUtil.SpreadSetCellLocked(shtQueryList, false, e.Row, (int)eCol.Value2);
                    }
                }
                else
                {
                    object oType = shtQueryList.Cells[e.Row, (int)eCol.ColumnType].Value;

                    if (eColumnType.String.ToString().Equals(oType))
                    {
                        CtrlUtil.SpreadSetCellLocked(shtQueryList, true, e.Row, (int)eCol.Value1);
                        CtrlUtil.SpreadSetCellLocked(shtQueryList, true, e.Row, (int)eCol.Value2);
                    }
                    else
                    {
                        CtrlUtil.SpreadSetCellLocked(shtQueryList, true, e.Row, (int)eCol.Value1);
                        CtrlUtil.SpreadSetCellLocked(shtQueryList, true, e.Row, (int)eCol.Value2);
                    }
                }
            }

            //if (e.Column == (int)eCol.Checkbox)
            //{
            //    bool blCheck = Convert.ToBoolean(shtQueryList.Cells[e.Row, (int)eCol.Checkbox].Value);

            //    if (blCheck)
            //    {
            //        int iMaxPriority = 0;
            //        int iPriority = 0;
            //        for (int i = 0; i < shtQueryList.RowCount; i++)
            //        {
            //            iPriority = 0;
            //            iPriority = Convert.ToInt32(shtQueryList.Cells[i, (int)eCol.Priority].Value);

            //            if (iPriority > iMaxPriority)
            //            {
            //                iMaxPriority = iPriority;
            //            }
            //        }

            //        iMaxPriority = (int)(iMaxPriority / 10 * 10) + 10;

            //        shtQueryList.Cells[e.Row, (int)eCol.Priority].Value = iMaxPriority;
            //    }
            //    else
            //    {
            //        shtQueryList.Cells[e.Row, (int)eCol.Priority].Value = null;
            //    }
            //}
        }
Esempio n. 28
0
 void BaseUserControl_EditChange(object sender, EditorNotifyEventArgs e)
 {
     changed(sender, e);
 }
Esempio n. 29
0
 /// <summary>
 /// Handle combo select changes event
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void fpSpread1_ComboSelChange(object sender, EditorNotifyEventArgs e)
 {
     if (e.Row == 3 && e.Column == 3)
       {
     //Check if user selected new value
     string selectedLevel = sheet1.Cells[3, 3].Text;
     if (selectedLevel != _currentLevel)
     {
       if (selectedLevel.Equals(GameLevels.Slow.ToString(), StringComparison.CurrentCultureIgnoreCase))
       {
     tmTick.Interval = (int)GameLevels.Slow;
       }
       else if (selectedLevel.Equals(GameLevels.Normal.ToString(), StringComparison.CurrentCultureIgnoreCase))
       {
     tmTick.Interval = (int)GameLevels.Normal;
       }
       else
       {
     tmTick.Interval = (int)GameLevels.Fast;
       }
       _currentLevel = selectedLevel;
     }
       }
 }
Esempio n. 30
0
 private void ss1_ButtonClicked(object sender, EditorNotifyEventArgs e)
 {
     ss1_ButtonClk(e.Column, e.Row);
 }
Esempio n. 31
0
 private void TableModules_ButtonClicked(object sender, EditorNotifyEventArgs e)
 {
 }