コード例 #1
0
 private void fpView_LeaveCell(object sender, LeaveCellEventArgs e)
 {
     if (e.Column == (int)eColumn.ITEM_CD)
     {
         LoadItemDesc(e.Row);
     }
 }
コード例 #2
0
 private void fpView_LeaveCell(object sender, LeaveCellEventArgs e)
 {
     try
     {
         if (m_bRowHasModified)
         {     // เช็คว่า Cell ในแถวนั้น มีการแก้ไขค่าหรือไม่
             if (e.Row != e.NewRow)
             { // ถ้าเป็นการเปลี่ยนแถว ต้องเช็คก่อนว่า Validate แถวผ่านหรือไม่?
                 if (!ValidateRowSpread(e.Row, false))
                 {
                     e.Cancel = true;
                 }
             }
         }
     }
     catch (ValidateException err)
     {
         for (int i = 0; i < err.ErrorResults.Count; i++)
         {
             MessageDialog.ShowBusiness(this, err.ErrorResults[i].Message);
             err.ErrorResults[i].FocusOnControl();
         }
     }
     catch (BusinessException err)
     {
         MessageDialog.ShowBusiness(this, err.Error.Message);
         err.Error.FocusOnControl();
     }
     catch (Exception ex)
     {
         MessageDialog.ShowBusiness(this, ex.Message);
     }
 }
コード例 #3
0
 ///<summary>
 /// spd 按回车光标横向移动,跳过lock的单元格.在spd的LeaveCell事件中使用.参数:sender,事件
 ///</summary>
 public static void SpdLockCheck(FpSpread ospd, object sender, LeaveCellEventArgs e)
 {
     if (ospd.ActiveSheet.Cells[e.NewRow, e.NewColumn].Locked == true)
     {
         System.Windows.Forms.SendKeys.Send("{ENTER}");
     }
 }
コード例 #4
0
        private void neuSpread1_LeaveCell(object sender, LeaveCellEventArgs e)
        {
            if (e.Column == 3)
            {
                if (neuSpread1_Sheet1.Cells[e.Row, 3].Text.ToString() == "")
                {
                    return;
                }
                Neusoft.HISFC.Models.Base.Spell      spCode  = new Neusoft.HISFC.Models.Base.Spell();
                Neusoft.HISFC.BizLogic.Manager.Spell mySpell = new Neusoft.HISFC.BizLogic.Manager.Spell();

                spCode = (Neusoft.HISFC.Models.Base.Spell)mySpell.Get(neuSpread1_Sheet1.Cells[e.Row, 3].Text.ToString());

                if (spCode.SpellCode.Length > 10)
                {
                    spCode.SpellCode = spCode.SpellCode.Substring(0, 10);
                }
                if (spCode.WBCode.Length > 10)
                {
                    spCode.WBCode = spCode.WBCode.Substring(0, 10);
                }

                this.neuSpread1_Sheet1.Cells[e.Row, 4].Value = spCode.SpellCode;
                this.neuSpread1_Sheet1.Cells[e.Row, 5].Value = spCode.WBCode;
            }
        }
コード例 #5
0
 private void fpSpread_LeaveCell(object sender, LeaveCellEventArgs e)
 {
     if (FpSpread.ActiveSheet.Cells[e.Row, e.Column].CellType is DownListCellType)
     {
         DownListCellType CellType = FpSpread.ActiveSheet.Cells[e.Row, e.Column].CellType as DownListCellType;
         CellType.DropDownButton = false;
     }
 }
コード例 #6
0
 //Spread 离开Cells变色
 public static void Spread_LeaveCellBColor(FpSpread Spd, LeaveCellEventArgs e, Color bColor, int startColumn, int endColumn)
 {
     if (e.NewRow < Spd.ActiveSheet.RowCount)
     {
         //Spd.ActiveSheet.Cells[startRow,startColumn,endRow,endColumn].BackColor = Color.Empty;
         if (Spd.ActiveSheet.Cells[e.Row, startColumn, e.Row, endColumn].BackColor != Color.Pink)
         {
             Spd.ActiveSheet.Cells[e.Row, startColumn, e.Row, endColumn].BackColor = Color.Empty;
         }
         Spd.ActiveSheet.Cells[e.NewRow, startColumn, e.NewRow, endColumn].BackColor = bColor;
     }
 }
コード例 #7
0
 private void fpView_LeaveCell(object sender, LeaveCellEventArgs e)
 {
     if (m_bRowHasModified)
     {     // เช็คว่า Cell ในแถวนั้น มีการแก้ไขค่าหรือไม่
         if (e.Row != e.NewRow)
         { // ถ้าเป็นการเปลี่ยนแถว ต้องเช็คก่อนว่า Validate แถวผ่านหรือไม่?
             if (!ValidateRowSpread(e.Row, false))
             {
                 e.Cancel = true;
             }
         }
     }
 }
コード例 #8
0
ファイル: NeuSpread.cs プロジェクト: ewin66/Management-System
        protected override void OnLeaveCell(LeaveCellEventArgs 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 == true)
                {
                    this.listBoxPopups[e.Column].Visible = false;
                }
                if (this.listBoxPopups[e.Column].Items.Count == 0)
                {
                    this.ActiveSheet.Cells[e.Row, e.Column].Text = "";
                    this.ActiveSheet.SetTag(e.Row, e.Column, null);
                }
            }
            base.OnLeaveCell(e);
        }
コード例 #9
0
        //private void fpIssueList_EditModeOff(object sender, EventArgs e)
        //{

        //    int rowIndex = shtIssueList.ActiveRowIndex;
        //    int colIndex = shtIssueList.ActiveColumnIndex;

        //    bool bValidateCellPass = ValidateCellEdited(rowIndex, colIndex);
        //    if (!bValidateCellPass)
        //    {
        //        shtIssueList.SetActiveCell(rowIndex, colIndex);
        //    }
        //}

        private void fpIssueList_LeaveCell(object sender, LeaveCellEventArgs e)
        {
            if (m_bRowHasModified)
            {     // เช็คว่า Cell ในแถวนั้น มีการแก้ไขค่าหรือไม่
                if (e.Row != e.NewRow)
                { // ถ้าเป็นการเปลี่ยนแถว ต้องเช็คก่อนว่า Validate แถวผ่านหรือไม่?
                    if (!ValidateRowSpread(e.Row, false))
                    {
                        e.Cancel = true;
                    }
                    //else
                    //{
                    //    if (m_RowAdd)
                    //    {
                    //        // re sort spread by item code
                    //        shtIssueList.SortRows((int)eColView.ITEM_CODE, true, true);
                    //        m_RowAdd = false;
                    //    }
                    //}
                }
            }
        }
コード例 #10
0
ファイル: ComSpread.cs プロジェクト: gaoge00/TianMaSystem
 //Spread 离开Cells变色
 public static void Spread_LeaveCellBColor(FpSpread Spd, LeaveCellEventArgs e, Color bColor, int startColumn, int endColumn)
 {
     if (e.NewRow < Spd.ActiveSheet.RowCount)
     {
         //Spd.ActiveSheet.Cells[startRow,startColumn,endRow,endColumn].BackColor = Color.Empty;
         if (Spd.ActiveSheet.Cells[e.Row, startColumn, e.Row, endColumn].BackColor != Color.Pink)
             Spd.ActiveSheet.Cells[e.Row, startColumn, e.Row, endColumn].BackColor = Color.Empty;
         Spd.ActiveSheet.Cells[e.NewRow, startColumn, e.NewRow, endColumn].BackColor = bColor;
     }
 }
コード例 #11
0
ファイル: ComSpread.cs プロジェクト: gaoge00/TianMaSystem
 ///<summary>
 /// spd 按回车光标横向移动,跳过lock的单元格.在spd的LeaveCell事件中使用.参数:sender,事件
 ///</summary>
 public static void SpdLockCheck(FpSpread ospd, object sender, LeaveCellEventArgs e)
 {
     if (ospd.ActiveSheet.Cells[e.NewRow, e.NewColumn].Locked == true)
     {
         System.Windows.Forms.SendKeys.Send("{ENTER}");
     }
 }