예제 #1
0
 /// <summary>
 /// farPoint单击 触发
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void fpDepartmentInfo_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
 {
     if (this._fpDepartmentInfo.ActiveSheet.Cells[e.Row, 1].Value != null)
     {
         // 判断点击的空间类型是否是.FpCheckBox)
         if (e.EditingControl is FarPoint.Win.FpCheckBox)
         {
             FarPoint.Win.FpCheckBox fpChk = (FarPoint.Win.FpCheckBox)e.EditingControl;
             // 判断是否被选中
             if (fpChk.Checked)
             {
                 // 保存索引号
                 if (!_departmentSel.Contains(this._fpDepartmentInfo.ActiveSheet.Cells[e.Row, 1].Value.ToString()))
                 {
                     _departmentSel.Add(this._fpDepartmentInfo.ActiveSheet.Cells[e.Row, 1].Value.ToString());
                     this._chkSelAll.CheckedChanged -= this.chkSelAll_CheckedChanged;
                     this._chkSelAll.Checked         = _departmentSel.Count == DepartmentInformationManagementBLL.GetRecordCountFromTable() ? true : false;
                     this._chkSelAll.CheckedChanged += this.chkSelAll_CheckedChanged;
                 }
             }
             else
             {
                 // 移除索引号
                 _departmentSel.Remove(this._fpDepartmentInfo.ActiveSheet.Cells[e.Row, 1].Value.ToString());
                 // 全选/全不选checkbox设为未选中
                 this._chkSelAll.CheckedChanged -= this.chkSelAll_CheckedChanged;
                 this._chkSelAll.Checked         = false;
                 this._chkSelAll.CheckedChanged += this.chkSelAll_CheckedChanged;
             }
         }
         // 删除按钮
         this.tsBtnDel.Enabled           = (_departmentSel.Count >= 1) ? true : false;
         this.除ToolStripMenuItem.Enabled = (_departmentSel.Count >= 1) ? true : false;
     }
 }
예제 #2
0
 private void FpAddRate_EditChange(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
 {
     if (this.FpAddRate_Sheet1.Cells[e.Row, 0].Text == "")
     {
         this.FpAddRate_Sheet1.Cells[e.Row, 0].Text = "MODIFY";
     }
 }
예제 #3
0
        private void sp2_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
        {
            string lvItemID = sp2.ActiveSheet.Cells[e.Row, 1].Text;

            if (lvItemID == "00021" || lvItemID == "00022" || lvItemID == "00023")
            {
                tabControl1.SelectedIndex = 2;
            }
            else
            {
                DialogResult dialogResult = MessageBox.Show("ยืนยันการทำรายการ", "แจ้งเตือน", MessageBoxButtons.YesNo);
                if (dialogResult == DialogResult.Yes)
                {
                    string lvPk = sp2.ActiveSheet.Cells[e.Row, 9].Text;
                    //Update ยอด
                    string lvSQL     = "Update Inv_Moving set M_Type = 'T' Where M_Pk = '" + lvPk + "' ";
                    string lvResault = GsysSQL.fncExecuteQueryData(lvSQL);

                    string lvItemName = sp2.ActiveSheet.Cells[e.Row, 2].Text;
                    string lvUserName = sp2.ActiveSheet.Cells[e.Row, 4].Text;

                    MessageBox.Show("บันทึกข้อมูลเรียบร้อย", "แจ้งเตือน", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    lvLoadItemBorrow(true);

                    string lvMsg = lvUserName + "  ได้นำ  " + lvItemName + "  มาคืนเรียบร้อยแล้ว ";
                    lineNotify(lvMsg);
                }
                else if (dialogResult == DialogResult.No)
                {
                    return;
                }
            }
        }
 private void fpUserInfo_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
 {
     if (this.fpUserInfo.ActiveSheet.Cells[e.Row, 1] != null)
     {
         // 判断点击的空间类型是否是.FpCheckBox)
         if (e.EditingControl is FarPoint.Win.FpCheckBox)
         {
             FarPoint.Win.FpCheckBox fpChk = (FarPoint.Win.FpCheckBox)e.EditingControl;
             // 判断是否被选中
             if (fpChk.Checked)
             {
                 if (!_userSel.Contains(this.fpUserInfo.ActiveSheet.Cells[e.Row, 1].Value.ToString()))
                 {
                     _userSel.Add(this.fpUserInfo.ActiveSheet.Cells[e.Row, 1].Value.ToString());
                 }
             }
             else
             {
                 // 移除索引号
                 _userSel.Remove(this.fpUserInfo.ActiveSheet.Cells[e.Row, 1].Value.ToString());
                 // 全选/全不选checkbox设为未选中
                 this.chkSelAll.CheckedChanged -= this.chkSelAll_CheckedChanged;
                 this.chkSelAll.Checked         = false;
                 this.chkSelAll.CheckedChanged += this.chkSelAll_CheckedChanged;
             }
             // 如果保存索引号件数是1,则修改按钮设为可用,否则设为不可用
             this.tsBtnModify.Enabled = (_userSel.Count == 1) ? true : false;
             // 删除按钮
             this.tsBtnDel.Enabled = (_userSel.Count >= 1) ? true : false;
             //this.删除ToolStripMenuItem.Enabled = (_userSel.Count >= 1) ? true : false;
         }
     }
 }
예제 #5
0
 void fpMain_EditChange(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
 {
     if (HaveBeenChanged != null)
     {
         HaveBeenChanged(sender, null);
     }
 }
        private void bSpread_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
        {
            BSpread bSpread = (BSpread)(sender);

            if (e.Column == 0)
            {
                if (e.Row == 0)
                {
                    if (Convert.ToBoolean(bSpread.ActiveSheet.Cells[e.Row, e.Column].Value))
                    {
                        for (int i = 1; i < bSpread.ActiveSheet.RowCount; i++)
                        {
                            if (bSpread.ActiveSheet.Cells[i, e.Column].CellType != null && bSpread.ActiveSheet.Cells[i, e.Column].CellType.GetType() == typeof(FarPoint.Win.Spread.CellType.CheckBoxCellType))
                            {
                                bSpread.ActiveSheet.Cells[i, e.Column].Value = 0;
                            }
                        }
                    }
                }
                else
                {
                    if (Convert.ToBoolean(bSpread.ActiveSheet.Cells[e.Row, e.Column].Value))
                    {
                        bSpread.ActiveSheet.Cells[0, e.Column].Value = false;
                    }
                }
            }
        }
예제 #7
0
 private void bsprContextValue_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
 {
     if (e.Column % 2 == 0)
     {
         if (e.Row == 0)
         {
             if (Convert.ToBoolean(this.bsprContextValue.ActiveSheet.Cells[e.Row, e.Column].Value))
             {
                 for (int i = 1; i < this.bsprContextValue.ActiveSheet.RowCount; i++)
                 {
                     if (this.bsprContextValue.ActiveSheet.Cells[i, e.Column].CellType != null && this.bsprContextValue.ActiveSheet.Cells[i, e.Column].CellType.GetType() == typeof(FarPoint.Win.Spread.CellType.CheckBoxCellType))
                     {
                         this.bsprContextValue.ActiveSheet.Cells[i, e.Column].Value = 0;
                     }
                 }
             }
         }
         else
         {
             if (Convert.ToBoolean(this.bsprContextValue.ActiveSheet.Cells[e.Row, e.Column].Value))
             {
                 this.bsprContextValue.ActiveSheet.Cells[0, e.Column].Value = false;
             }
         }
     }
 }
예제 #8
0
        private void neuSpread1_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
        {
            string xmlField = "";

            switch (e.Column)
            {
            case 1:
                xmlField = "visible";
                break;

            case 2:
                xmlField = "sort";
                break;

            case 3:
                xmlField = "enable";
                break;
            }
            if (xmlField != "")
            {
                XmlNode myNode = this.GetNowXmlNode();
                if (myNode != null && this.doc != null)
                {
                    myNode.Attributes[xmlField].Value = this.neuSpread1_Sheet1.Cells[e.Row, e.Column].Text;
                    this.doc.Save(this.filePath);
                }
            }
        }
 void fpConditionTypeElement_EditChange(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
 {
     if (HaveBeenChanged != null)
     {
         HaveBeenChanged(sender, null);
     }
 }
예제 #10
0
 private void FpMetItemAddRule_EditChange(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
 {
     if (this.FpMetItemAddRule_Sheet1.Cells[e.Row, 0].Text == "" && e.Column == 8)
     {
         this.FpMetItemAddRule_Sheet1.Cells[e.Row, 0].Text = "MODIFY";
     }
 }
예제 #11
0
        private void fpsStaffList_ComboCloseUp(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
        {
            if (this.fpsStaffList_Sheet1.Cells.Get(e.Row, _col_stamptype).Value.ToString() == "3")
            {
                this.fpsStaffList_Sheet1.Cells.Get(e.Row, _col_lateminutes).Locked    = false;
                this.fpsStaffList_Sheet1.Cells.Get(e.Row, _col_lateminutes).BackColor = Color.Gainsboro;
                this.fpsStaffList_Sheet1.Cells.Get(e.Row, _col_lateminutes).Border    = new FarPoint.Win.BevelBorder(FarPoint.Win.BevelBorderType.Lowered);
                this.fpsStaffList_Sheet1.SetActiveCell(e.Row, _col_lateminutes);
            }
            else
            {
                this.fpsStaffList_Sheet1.Cells.Get(e.Row, _col_lateminutes).Locked = true;
                this.fpsStaffList_Sheet1.Cells.Get(e.Row, _col_lateminutes).ResetBackColor();
                this.fpsStaffList_Sheet1.Cells.Get(e.Row, _col_lateminutes).ResetBorder();
                this.fpsStaffList_Sheet1.Cells.Get(e.Row, _col_lateminutes).Value = 0;
                this.fpsStaffList_Sheet1.Cells.Get(e.Row, _col_lateminutes).Text  = "";
            }

            if (this.fpsStaffList_Sheet1.Cells.Get(e.Row, _col_stamptype).Value.ToString() == "1")
            {
                this.fpsStaffList_Sheet1.Cells.Get(e.Row, _col_remark).Locked = true;
                this.fpsStaffList_Sheet1.Cells.Get(e.Row, _col_remark).ResetBackColor();
                this.fpsStaffList_Sheet1.Cells.Get(e.Row, _col_remark).ResetBorder();
                this.fpsStaffList_Sheet1.Cells.Get(e.Row, _col_remark).ResetForeColor();;
            }
            else
            {
                this.fpsStaffList_Sheet1.Cells.Get(e.Row, _col_remark).Locked    = false;
                this.fpsStaffList_Sheet1.Cells.Get(e.Row, _col_remark).BackColor = Color.Gainsboro;
                this.fpsStaffList_Sheet1.Cells.Get(e.Row, _col_remark).Border    = new FarPoint.Win.BevelBorder(FarPoint.Win.BevelBorderType.Lowered);
                this.fpsStaffList_Sheet1.Cells.Get(e.Row, _col_remark).ForeColor = Color.Red;
            }
        }
예제 #12
0
        private void neuSpread1_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
        {
            this.neuSpread1.StopCellEditing();
            string strTemp = this.neuSpread1_Sheet1.GetValue(e.Row, 0).ToString().ToUpper();

            if (e.Column == 0)
            {
                for (int i = 0; i < this.neuSpread1_Sheet1.RowCount; i++)
                {
                    //病历号,顺序号,组号,登记时间
                    if (this.neuSpread1_Sheet1.Cells[i, 2].Tag.ToString() == this.neuSpread1_Sheet1.Cells[e.Row, 2].Tag.ToString() &&
                        this.neuSpread1_Sheet1.Cells[i, 3].Tag.ToString() == this.neuSpread1_Sheet1.Cells[e.Row, 3].Tag.ToString() &&
                        this.neuSpread1_Sheet1.Cells[i, 8].Tag.ToString() == this.neuSpread1_Sheet1.Cells[e.Row, 8].Tag.ToString() &&
                        this.neuSpread1_Sheet1.Cells[i, 8].Tag != null && this.neuSpread1_Sheet1.Cells[i, 8].Tag.ToString() != "" &&
                        this.neuSpread1_Sheet1.Cells[i, 14].Tag.ToString() == this.neuSpread1_Sheet1.Cells[e.Row, 14].Tag.ToString())
                    {
                        if (strTemp == "TRUE")
                        {
                            this.neuSpread1_Sheet1.SetValue(i, 0, true, false);
                        }
                        else
                        {
                            this.neuSpread1_Sheet1.SetValue(i, 0, false, false);
                        }
                    }
                }
            }
        }
예제 #13
0
        private void bsprChamber_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
        {
            if (e.Column != (int)iChamberColIdx.SELECT)
            {
                return;
            }

            if ((bool)this.bsprChamber.GetCellValue(e.Row, (int)iChamberColIdx.SELECT) == true)
            {
                for (int i = 0; i < this.bsprChamber.ActiveSheet.RowCount; i++)
                {
                    if (e.Row == i)
                    {
                        if (e.Column == (int)iChamberColIdx.SELECT)
                        {
                            this.bsprChamber.ActiveSheet.Cells[i, (int)iChamberColIdx.SELECT].Value = 1;

                            LinkedList llparam = new LinkedList();

                            if (_isAllExist)
                            {
                                llparam.Add(Definition.SUMMARY_DATA.DATA_EXIST_MODE, Definition.SUMMARY_DATA.ALL_EXIST);
                            }
                            else if (_isRecipeExist && !_sRecipe.Equals("*"))
                            {
                                llparam.Add(Definition.SUMMARY_DATA.DATA_EXIST_MODE, Definition.SUMMARY_DATA.ONLY_RECIPE_EXIST);
                            }
                            else if (_isStepExist)
                            {
                                llparam.Add(Definition.SUMMARY_DATA.DATA_EXIST_MODE, Definition.SUMMARY_DATA.ONLY_STEP_EXIST);
                            }

                            string eqpModuleId = ((DataSet)bsprChamber.DataSet).Tables[0].Rows[i][Definition.COL_EQP_MODULE_ID].ToString();

                            llparam.Add(Definition.COL_EQP_MODULE_ID, eqpModuleId);

                            byte[]  badata       = llparam.GetSerialData();
                            DataSet dsRecipeStep = _wsSPC.GetRecipeStepByEqpModuleId(badata);

                            LoadRecipeStepData(dsRecipeStep);

                            _sTempModuleid = eqpModuleId;
                        }

                        continue;
                    }

                    this.bsprChamber.ActiveSheet.Cells[i, (int)iChamberColIdx.SELECT].Value = 0;
                }

                this.bsprRecipe.CheckBoxManager(0, false);
                this.bsprRecipe.CheckBoxManager(0, true);
            }
            else
            {
                ((DataSet)bsprRecipe.DataSet).Tables[0].Rows.Clear();
            }

            _iSelectedEqpChamberIndex = e.Row;
        }
예제 #14
0
 /// <summary>
 /// farpoint单元格单击事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void fpUserInformationDetails_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
 {
     // 判断点击的空间类型是否是.FpCheckBox)
     if (e.EditingControl is FarPoint.Win.FpCheckBox)
     {
         FarPoint.Win.FpCheckBox fpChk = (FarPoint.Win.FpCheckBox)e.EditingControl;
         // 判断是否被选中
         if (fpChk.Checked)
         {
             if (!_userSel.Contains((int)this.fpUserInformationDetails.ActiveSheet.Cells[e.Row, 1].Value))
             {
                 //添加  记录用户信息
                 _userSel.Add((int)this.fpUserInformationDetails.ActiveSheet.Cells[e.Row, 1].Value);
                 //checkbox赋值前,先移除CheckedChanged事件,然后加上
                 this.chkSelAll.CheckedChanged -= this.chkSelAll_CheckedChanged;
                 chkSelAll.Checked              = (_userSel.Count == _fpRowsCount - _fpRowsTitleCount) ? true : false;
                 this.chkSelAll.CheckedChanged += this.chkSelAll_CheckedChanged;
             }
         }
         else
         {
             // 移除索引号
             _userSel.Remove((int)this.fpUserInformationDetails.ActiveSheet.Cells[e.Row, 1].Value);
             // 全选/全不选checkbox设为未选中
             this.chkSelAll.CheckedChanged -= this.chkSelAll_CheckedChanged;
             this.chkSelAll.Checked         = false;
             this.chkSelAll.CheckedChanged += this.chkSelAll_CheckedChanged;
         }
         // 如果保存索引号件数是1,则修改按钮设为可用,否则设为不可用
         this.tsBtnModify.Enabled = (_userSel.Count == 1) ? true : false;
         // 删除按钮
         this.tsBtnDel.Enabled = (_userSel.Count >= 1) ? true : false;
     }
 }
예제 #15
0
        private void fpSpread2_ComboCloseUp(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
        {
            //    if (fpSpread2_Sheet1.IsSelected(0, 3))
            //{
            //    fpSpread2_Sheet1.Cells.Get(3, 4).Value = 211100;
            //}
            //else if (fpSpread2_Sheet1.IsSelected(1, 3))
            //{
            //    fpSpread2_Sheet1.Cells.Get(3, 4).Value = 9999;
            //}
            //else if (fpSpread2_Sheet1.IsSelected(0, 4))
            //{
            //    fpSpread2_Sheet1.Cells.Get(3, 4).Value = 1111;
            //}
            //FarPoint.Win.Spread.CellType.ComboBoxCellType comboBoxCellType1 = (FarPoint.Win.Spread.CellType.ComboBoxCellType)fpSpread2.ActiveSheet.ActiveCell.CellType;
            //FarPoint.Win.Spread.CellType.ComboBoxCellType comboBoxCellType2 = (FarPoint.Win.Spread.CellType.ComboBoxCellType)fpSpread2.ActiveSheet.ActiveCell.CellType;
            ////c.StopEditing();
            ////SendKeys.Send("\r");
            ////FarPoint.Win.Spread.CellType.ComboBoxCellType comboBoxCellType1 = new FarPoint.Win.Spread.CellType.ComboBoxCellType();
            //if (!comboBoxCellType1.Equals(""))
            //    {
            //    fpSpread2_Sheet1.Cells.Get(3, 2).Value = 200;
            //}

            //if (!comboBoxCellType2.Equals(""))
            //{
            //    fpSpread2_Sheet1.Cells.Get(3, 4).Value = 211100;
            //}
        }
예제 #16
0
        private void bsprParam_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
        {
            if (e.Column != _ColIdx_SELECT)
            {
                return;
            }

            if ((bool)this.bsprParam.GetCellValue(e.Row, _ColIdx_SELECT) == true)
            {
                for (int i = 0; i < this.bsprParam.ActiveSheet.RowCount; i++)
                {
                    if (e.Row == i)
                    {
                        if (e.Column != _ColIdx_SELECT)
                        {
                            this.bsprParam.ActiveSheet.Cells[i, _ColIdx_SELECT].Value = 1;
                        }

                        this._iSelectedRowIdx = e.Row;

                        continue;
                    }

                    this.bsprParam.ActiveSheet.Cells[i, _ColIdx_SELECT].Value = 0;
                }
            }
            else
            {
                this._iSelectedRowIdx = -1;
            }
        }
예제 #17
0
 private void neuSpread1_ComboCloseUp(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
 {
     if (e.Column == 3)
     {
         this.neuSpread1_Sheet1.SetActiveCell(this.neuSpread1_Sheet1.ActiveRowIndex,
                                              this.neuSpread1_Sheet1.ActiveColumnIndex + 1);
     }
 }
예제 #18
0
        private void fpClass3_ComboSelChange(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
        {
            if (e.Column == 3)
            {
                try
                {
                    //取当前选中的系统权限名称
                    string text = ((FarPoint.Win.FpCombo)e.EditingControl).SelectedItem.ToString();
                    //找到文本所对应的系统权限编码,付给对应的列
                    foreach (Neusoft.FrameWork.Models.NeuObject info in this.alClass3Meaning)
                    {
                        if (text == info.Name)
                        {
                            this.fpClass3_Sheet1.Cells[e.Row, 2].Value = info.ID;
                            break;
                        }
                    }

                    //如果此二级权限下没有系统权限,则默认二级权限名称,编码为01
                    if (this.alClass3Meaning.Count == 0)
                    {
                        this.fpClass3_Sheet1.Cells[e.Row, 0].Text = "01"; //三级权限编码
                        this.fpClass3_Sheet1.Cells[e.Row, 2].Text = "01"; //系统权限编码
                    }

                    //三级权限默认名称为系统权限名称
                    if (this.fpClass3_Sheet1.Cells[e.Row, 1].Text == "")
                    {
                        this.fpClass3_Sheet1.Cells[e.Row, 1].Text = text;
                    }
                }
                catch { }
            }
            if (e.Column == 5)
            {
                try
                {
                    if (e.EditingControl == null)
                    {
                        return;
                    }

                    //取当前选中的系统权限名称
                    string text = ((FarPoint.Win.FpCombo)e.EditingControl).SelectedItem.ToString();
                    //找到文本所对应的系统权限编码,付给对应的列
                    foreach (string strKey in this.hsClass3JoinCode.Keys)
                    {
                        if (this.hsClass3JoinCode[strKey] as string == text)
                        {
                            this.fpClass3_Sheet1.Cells[e.Row, 4].Value = strKey;
                            break;
                        }
                    }
                }
                catch { }
            }
        }
예제 #19
0
        private void GrdView_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
        {
            VoucherConfirm frm = new VoucherConfirm();

            frm.lsVouNO     = GrdView.ActiveSheet.GetText(e.Row, 0);
            frm.Connnection = lsGdb.Gdb;
            frm.ShowDialog(this);
            InsertCondition();
            SelectVoucher(lsStartDate, lsEndDate, lsFlag);
        }
예제 #20
0
 private void neuSpread1_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
 {
     if (e.Column == 8)
     {
         this.GenXML();
         XmlNode    node  = this.xmlDoc.SelectSingleNode(string.Format("MaintanceControl/Columns/Column[@ID='{0}']", this.neuSpread1_Sheet1.Cells[e.Row, 0].Text));
         XmlElement field = node as XmlElement;
         frmQuery   f     = new frmQuery(new ucMaintenanceComboBox(field));
         f.ShowDialog();
         this.neuSpread1_Sheet1.Cells[e.Row, 8].Tag = field;
     }
 }
예제 #21
0
 protected override void ss_EditChange(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
 {
     base.ss_EditChange(sender, e);
     if (base.i_ScCurrSeq == 1)
     {
         proNum = 2;
     }
     else
     {
         proNum = 3;
     }
 }
예제 #22
0
        private void neuSpread1_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
        {
            if (e.Column == 0)
            {
                this.drugControl = this.neuSpread1_Sheet1.Rows[e.Row].Tag as Neusoft.HISFC.Models.Pharmacy.DrugControl;

                if (this.SelectControlEvent != null)
                {
                    this.SelectControlEvent(this.drugControl);
                }
            }
        }
예제 #23
0
 private void neuSpread1_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
 {
     if (e.Column == (int)Col.ColUpdate)
     {
         int sort = Neusoft.FrameWork.Function.NConvert.ToInt32(this.neuSpread1_Sheet1.Cells[e.Row, (int)Col.ColSortID].Text);
         if (sort >= 0)
         {
             Neusoft.FrameWork.Management.PublicTrans.BeginTransaction();
             if (this.itemLevelManager.UpdateItemSortID(sort.ToString(), this.neuSpread1_Sheet1.Cells[e.Row, (int)Col.ColCode].Text, (this.tvItemLevel1.SelectedNode.Tag as Neusoft.HISFC.Models.Fee.Item.ItemLevel).ID) < 0)
             {
                 Neusoft.FrameWork.Management.PublicTrans.RollBack();
                 MessageBox.Show("更新排序号失败!" + this.itemLevelManager.Err);
                 return;
             }
             Neusoft.FrameWork.Management.PublicTrans.Commit();
             MessageBox.Show("更新排序号成功");
         }
     }
     if (e.Column == (int)Col.ColDel)
     {
         Neusoft.FrameWork.Management.PublicTrans.BeginTransaction();
         if (this.itemLevelManager.deleteItem(this.neuSpread1_Sheet1.Cells[e.Row, (int)Col.ColCode].Text, (this.tvItemLevel1.SelectedNode.Tag as Neusoft.HISFC.Models.Fee.Item.ItemLevel).ID) < 0)
         {
             Neusoft.FrameWork.Management.PublicTrans.RollBack();
             MessageBox.Show("删除失败!" + this.itemLevelManager.Err);
             return;
         }
         Neusoft.FrameWork.Management.PublicTrans.Commit();
         MessageBox.Show("删除成功!");
         this.neuSpread1_Sheet1.RowCount = 0;
         ArrayList alItemLevel = new ArrayList();
         Neusoft.HISFC.Models.Fee.Item.ItemLevel myItemLevel = this.tvItemLevel1.SelectedNode.Tag as Neusoft.HISFC.Models.Fee.Item.ItemLevel;
         if (myItemLevel.ID == "ROOT")
         {
             alItemLevel = this.itemLevelManager.GetAllItemByFolderAndItemClass(myItemLevel.ID, myItemLevel.LevelClass.ID);
         }
         else
         {
             alItemLevel = this.itemLevelManager.GetAllItemByFolderID(myItemLevel.ID);
         }
         if (alItemLevel != null)
         {
             foreach (Neusoft.HISFC.Models.Fee.Item.ItemLevel itemLevel in alItemLevel)
             {
                 this.neuSpread1_Sheet1.AddRows(this.neuSpread1_Sheet1.RowCount, 1);
                 int lastRowIndex = this.neuSpread1_Sheet1.RowCount - 1;
                 this.neuSpread1_Sheet1.Cells[lastRowIndex, (int)Col.ColCode].Text   = itemLevel.ID;
                 this.neuSpread1_Sheet1.Cells[lastRowIndex, (int)Col.ColName].Text   = itemLevel.Name;
                 this.neuSpread1_Sheet1.Cells[lastRowIndex, (int)Col.ColSortID].Text = itemLevel.SortID.ToString();
             }
         }
     }
 }
예제 #24
0
        private void bsprOCAP_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
        {
            if (e.Column != (int)_ColIdx_SELECT)
            {
                return;
            }

            if (this._sOCAPOfSingle)
            {
                if (e.Column == (int)_ColIdx_SELECT)
                {
                    if ((bool)this.bsprOCAP.GetCellValue(e.Row, (int)_ColIdx_SELECT) == true)
                    {
                        this.bsprOCAP.ActiveSheet.Rows[e.Row].BackColor = Color.Yellow;
                        for (int i = 0; i < this.bsprOCAP.ActiveSheet.RowCount; i++)
                        {
                            if (e.Row == i)
                            {
                                if (e.Column != (int)_ColIdx_SELECT)
                                {
                                    this.bsprOCAP.ActiveSheet.Cells[i, (int)_ColIdx_SELECT].Value = 1;
                                }
                                continue;
                            }

                            this.bsprOCAP.ActiveSheet.Cells[i, (int)_ColIdx_SELECT].Value = 0;
                            this.bsprOCAP.ActiveSheet.Rows[i].BackColor = Color.White;
                        }
                    }
                    else
                    {
                        this.bsprOCAP.ActiveSheet.Rows[e.Row].BackColor = Color.White;
                    }
                }
            }
            else
            {
                ArrayList alSelectedRows = this.bsprOCAP.GetCheckedList((int)_ColIdx_SELECT);

                for (int idxTmpChartList = 0; idxTmpChartList < this.bsprOCAP.ActiveSheet.RowCount; idxTmpChartList++)
                {
                    if (alSelectedRows.Contains(idxTmpChartList))
                    {
                        this.bsprOCAP.ActiveSheet.Rows[idxTmpChartList].BackColor = Color.Yellow;
                    }
                    else
                    {
                        this.bsprOCAP.ActiveSheet.Rows[idxTmpChartList].BackColor = Color.White;
                    }
                }
            }
        }
예제 #25
0
        private void bspr_StepData_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
        {
            //int Count = e.Row;

            //if (bool.Parse(this.bspr_StepData.ActiveSheet.Cells[Count, 0].Text))
            //{
            //    this.TableNameList.Add(this.bspr_StepData.ActiveSheet.Cells[Count, _iSeriesNameColIndex].Text);
            //}
            //else
            //{
            //    this.TableNameList.Remove(this.bspr_StepData.ActiveSheet.Cells[Count, _iSeriesNameColIndex].Text);
            //}
        }
 private void fsReport_ComboCloseUp(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
 {
     if (e.Column == (int)ReportColumnEnum.ColEli)
     {
         if (this.ConvertStringToBool(this.fsReport_Sheet1.Cells[e.Row, e.Column].Text))     //合格
         {
             this.fsReport_Sheet1.Rows[e.Row].ForeColor = System.Drawing.Color.Black;
         }
         else                                                                               //不合格
         {
             this.fsReport_Sheet1.Rows[e.Row].ForeColor = System.Drawing.Color.Red;
         }
     }
 }
 private void fsReport_ComboSelChange(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
 {
     //if (e.Column == (int)ReportColumnEnum.ColEli)
     //{
     //    if (this.ConvertStringToBool(this.fsReport_Sheet1.Cells[e.Row, e.Column].Text))
     //    {
     //        this.fsReport_Sheet1.Rows[e.Row].ForeColor = System.Drawing.Color.Red;
     //    }
     //    else
     //    {
     //        this.fsReport_Sheet1.Rows[e.Row].ForeColor = System.Drawing.Color.Black;
     //    }
     //}
 }
        private void neuSpread2_ComboCloseUp(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
        {
            ReportPrintControl reportPrintControl = this.neuSpread2_Sheet1.Rows[e.Row].Tag as ReportPrintControl;

            if (reportPrintControl != null)
            {
                reportPrintControl.DllName       = this.neuSpread2_Sheet1.Cells[e.Row, 1].Text;
                reportPrintControl.ControlName   = this.neuSpread2_Sheet1.Cells[e.Row, 2].Text;
                reportPrintControl.Memo          = this.neuSpread2_Sheet1.Cells[e.Row, 3].Text;
                reportPrintControl.InterfaceName = this.neuSpread2_Sheet1.Cells[e.Row, 0].Text;

                reportPrintControl.Index = (short)e.Row;
            }
        }
예제 #29
0
 //spread的ButtonClicked事件,用于第一列checkbox的点击。
 private void ss1_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
 {
     if (ss1_Sheet1.Cells[e.Row, 0].Text == "True" && e.Column == 0)
     {
         ss1_Sheet1.RowHeader.Cells[e.Row, 0].Text = "修改";
         ss1_Sheet1.Cells[e.Row, 48].Text          = GeneralCommon.sUserID;
         ss1_Sheet1.Cells[e.Row, 49].Text          = GeneralCommon.sUsername;
     }
     else if (e.Column == 0)
     {
         ss1_Sheet1.RowHeader.Cells[e.Row, 0].Text = "";
         ss1_Sheet1.Cells[e.Row, 48].Text          = "";
         ss1_Sheet1.Cells[e.Row, 49].Text          = "";
     }
 }
예제 #30
0
 private void fpSpread2_ComboSelChange(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
 {
     //if (fpSpread2_Sheet1.IsSelected(0, 3))
     //{
     //    fpSpread2_Sheet1.Cells.Get(3, 4).Value = 211100;
     //}
     //else if (fpSpread2_Sheet1.IsSelected(1, 3))
     //{
     //    fpSpread2_Sheet1.Cells.Get(3, 4).Value = 9999;
     //}
     //else if (fpSpread2_Sheet1.IsSelected(0, 4))
     //{
     //    fpSpread2_Sheet1.Cells.Get(3, 4).Value = 1111;
     //}
 }