Esempio n. 1
0
 private void neuFpEnter1_LeaveCell(object sender, FarPoint.Win.Spread.LeaveCellEventArgs e)
 {
     //if (!ValidDefaultState())
     //{
     //    MessageBox.Show("只能有一个默认号段");
     //}
 }
Esempio n. 2
0
 private void fpSpread1_LeaveCell(object sender, FarPoint.Win.Spread.LeaveCellEventArgs e)
 {
     if (e.Column == (int)ColEnum.ColNum)
     {
         this.Count();
     }
 }
Esempio n. 3
0
 //Spread的LeaveCell事件,假如当前行第一列checkbox的状态不为选择状态,执行行刷新。
 private void ss1_LeaveCell(object sender, FarPoint.Win.Spread.LeaveCellEventArgs e)
 {
     if (ss1_Sheet1.Cells[e.Row, 0].Text != "True")
     {
         //string sQuery = "{call WGC3030C.P_SONEROW ( '" + ss1_Sheet1.Cells[e.Row, 2].Text.Trim() + "')}";
         //SpreadCommon.Gp_Sp_OneRowDisplay(GeneralCommon.M_CN1, sQuery, ss1, e.Row);
     }
 }
Esempio n. 4
0
        private void bsprGroupList_LeaveCell(object sender, FarPoint.Win.Spread.LeaveCellEventArgs e)
        {
            if (this.bsprGroupList.DataSet != null)
            {
                DataTable dt = ((DataSet)this.bsprGroupList.DataSet).Tables[0];

                //Insert된 Row에 대해서 Select column Cell Lock 설정
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    if (this.bsprGroupList.ActiveSheet.Cells[i, (int)GroupColumnIndex.Insert].Value.ToString() == Definition.VARIABLE_TRUE)
                    {
                        this.bsprGroupList.ActiveSheet.Cells[i, (int)GroupColumnIndex.Select].Locked = true;
                    }
                }

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    if (this.bsprGroupList.ActiveSheet.Cells[i, (int)GroupColumnIndex.GroupModel].Value != null)
                    {
                        this.bsprGroupList.ActiveSheet.Cells[i, (int)GroupColumnIndex.GroupModel].Value = this.bsprGroupList.ActiveSheet.Cells[i, (int)GroupColumnIndex.GroupModel].Value.ToString().ToUpper();
                    }
                }

                for (int i = 0; i < _dtGroup.Rows.Count; i++)
                {
                    if (dt.Rows[i][COLUMN.GROUP_NAME].ToString() == _dtGroup.Rows[i][COLUMN.GROUP_NAME].ToString())
                    {
                        this.bsprGroupList.ActiveSheet.Cells[i, (int)GroupColumnIndex.Modify].Value = Definition.VARIABLE_FALSE;
                    }
                    else
                    {
                        this.bsprGroupList.ActiveSheet.Cells[i, (int)GroupColumnIndex.Modify].Value = Definition.VARIABLE_TRUE;
                    }
                }

                //for (int i = 0; i < dt.Columns.Count; i++)
                //{
                //    for (int j = 0; j < dt.Rows.Count; j++)
                //    {
                //        //Group Name이 변경된 경우만 Modify Column에 check.
                //        if (dt.Rows.Count == this._dtGroup.Rows.Count)
                //        {
                //            if (dt.Rows[j][i].ToString() != this._dtGroup.Rows[j][i].ToString() && (i != (int)GroupColumnIndex.Insert && i != (int)GroupColumnIndex.Modify
                //                && i != (int)GroupColumnIndex.Delete && i != (int)GroupColumnIndex.Select) && dt.Rows[j][(int)GroupColumnIndex.Insert].ToString() != Definition.VARIABLE_TRUE)
                //            {
                //                this.bsprGroupList.ActiveSheet.Cells[j, (int)GroupColumnIndex.Modify].Value = Definition.VARIABLE_TRUE;
                //                //return;
                //            }
                //            //else
                //            //{
                //            //    this.bsprGroupList.ActiveSheet.Cells[j, (int)GroupColumnIndex.Modify].Value = Definition.VARIABLE_FALSE;
                //            //}
                //        }
                //    }
                //}
            }
        }
        private void fpSpread1_LeaveCell(object sender, FarPoint.Win.Spread.LeaveCellEventArgs e)
        {
            if (e.Column == (int)ColumnSet.ColName)
            {
                Neusoft.HISFC.Models.Base.Spell spCode = new Neusoft.HISFC.Models.Base.Spell();

                spCode = (Neusoft.HISFC.Models.Base.Spell) this.spellManager.Get(this.neuSpread1_Sheet1.Cells[e.Row, (int)ColumnSet.ColName].Text.ToString());

                if (spCode == null)
                {
                    return;
                }
                if (spCode.SpellCode == null || spCode.SpellCode == "")
                {
                    return;
                }

                this.neuSpread1_Sheet1.Cells[e.Row, (int)ColumnSet.ColSpellCode].Value = spCode.SpellCode;
                this.neuSpread1_Sheet1.Cells[e.Row, (int)ColumnSet.ColWBCode].Value    = spCode.WBCode;
            }
        }
Esempio n. 6
0
 private void fpSpread1_LeaveCell(object sender, FarPoint.Win.Spread.LeaveCellEventArgs e)
 {
 }
Esempio n. 7
0
 private void fspdMc_LeaveCell(object sender, FarPoint.Win.Spread.LeaveCellEventArgs e)
 {
     ComSpread.Spread_LeaveCellBColor(fspdMc, e, Color.Lavender);
 }
Esempio n. 8
0
 private void fpSelector_LeaveCell(object sender, FarPoint.Win.Spread.LeaveCellEventArgs e)
 {
     ((FarPoint.Win.Spread.FpSpread)sender).ActiveSheet.Rows[e.Row].BackColor = Color.White;
 }