コード例 #1
0
 private void neuSpread1_Sheet1_CellChanged(object sender, FarPoint.Win.Spread.SheetViewEventArgs e)
 {
     try
     {
         if (e.Column == 0)
         {
             Neusoft.HISFC.Models.Order.Frequency f = new Neusoft.HISFC.Models.Order.Frequency();
             try
             {
                 f.ID = this.neuSpread1_Sheet1.Cells[e.Row, e.Column].Text;
                 if (f.Name != "")
                 {
                     this.neuSpread1_Sheet1.Cells[e.Row, 1].Text = f.Name;
                 }
             }
             catch { }
         }
         else if (e.Column == 3)
         {
             //更新用法ID
             this.neuSpread1_Sheet1.Cells[e.Row, e.Column - 1].Text = GetUsageCode(this.neuSpread1_Sheet1.Cells[e.Row, e.Column].Text);
         }
     }
     catch { }
 }
コード例 #2
0
 private void fpSpread1_Sheet1_CellChanged(object sender, FarPoint.Win.Spread.SheetViewEventArgs e)
 {
     if (e.Column == 5 && dirty == false)
     {
         Neusoft.HISFC.Models.Order.Order order = this.fpSpread1_Sheet1.Rows[e.Row].Tag as Neusoft.HISFC.Models.Order.Order;
         if (order == null)
         {
             return;
         }
         order.User03 = this.fpSpread1_Sheet1.Cells[e.Row, e.Column].Value.ToString();
         if (order.Combo.ID != null && order.Combo.ID != "")
         {
             for (int i = 0; i < this.fpSpread1_Sheet1.RowCount; i++)
             {
                 Neusoft.HISFC.Models.Order.Order obj = this.fpSpread1_Sheet1.Rows[i].Tag as Neusoft.HISFC.Models.Order.Order;
                 if (obj.Combo.ID == order.Combo.ID)
                 {
                     obj.User03 = order.User03;
                     dirty      = true;
                     this.fpSpread1_Sheet1.Cells[i, e.Column].Value = order.User03;
                     dirty = false;
                 }
             }
         }
     }
 }
コード例 #3
0
 private void fpSpread1_Sheet1_CellChanged(object sender, FarPoint.Win.Spread.SheetViewEventArgs e)
 {
     if (ValueChanged != null)
     {
         ValueChanged(sender, System.EventArgs.Empty);
     }
 }
コード例 #4
0
 private void fpSpread1_Sheet1_CellChanged(object sender, FarPoint.Win.Spread.SheetViewEventArgs e)
 {
     if (!this.inited)
     {
         return;
     }
     if (this.ItemModified != null)
     {
         this.ItemModified(this, null);
     }
 }
コード例 #5
0
 /// <summary>
 /// 离开CELL时发生,用于  计算合计金额
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void fpSpread1_Sheet1_CellChanged(object sender, FarPoint.Win.Spread.SheetViewEventArgs e)
 {
     if (fpSpread1_Sheet1.ActiveColumnIndex == 2)
     {
         decimal tempDecimal = 0;
         for (int i = 0; i < fpSpread1_Sheet1.Rows.Count - 1; i++)
         {
             //累计金额
             tempDecimal += Neusoft.FrameWork.Function.NConvert.ToDecimal(fpSpread1_Sheet1.Cells[i, 2].Text);
         }
         //更改合计金额
         fpSpread1_Sheet1.Cells[fpSpread1_Sheet1.Rows.Count - 1, 2].Text = tempDecimal.ToString();
     }
 }
コード例 #6
0
        /// <summary>
        /// 自动改变行高,与更新数据冲突现在不用
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void FrmSheet11_1_CellChanged(object sender, FarPoint.Win.Spread.SheetViewEventArgs e)
        {
            int flag        = 0;
            int ActiveSheet = 0;

            if (flag == 1)
            {
                flag = 0;
                return;
            }
            else
            {
                flag        = 1;
                ActiveSheet = fpSpread1.ActiveSheetIndex;
                //PF.SetRowHeight(fpSpread1.Sheets[ActiveSheet], e.Row, e.Column, fpSpread1.Sheets[ActiveSheet].GetValue(e.Row, e.Column));
            }
        }
コード例 #7
0
 private void neuSpread1_Sheet1_CellChanged(object sender, FarPoint.Win.Spread.SheetViewEventArgs e)
 {
     if (e.Column == (int)ColumnSet.ColBeginNum ||
         e.Column == (int)ColumnSet.ColInNum ||
         e.Column == (int)ColumnSet.ColTransferIn ||
         e.Column == (int)ColumnSet.ColTransferOut ||
         e.Column == (int)ColumnSet.ColOutNu)
     {
         int beginNum    = FrameWork.Function.NConvert.ToInt32(this.neuSpread1_Sheet1.Cells[e.Row, (int)ColumnSet.ColBeginNum].Text);
         int tnNum       = FrameWork.Function.NConvert.ToInt32(this.neuSpread1_Sheet1.Cells[e.Row, (int)ColumnSet.ColInNum].Text);
         int transferIn  = FrameWork.Function.NConvert.ToInt32(this.neuSpread1_Sheet1.Cells[e.Row, (int)ColumnSet.ColTransferIn].Text);
         int transferOut = FrameWork.Function.NConvert.ToInt32(this.neuSpread1_Sheet1.Cells[e.Row, (int)ColumnSet.ColTransferOut].Text);
         int outNum      = FrameWork.Function.NConvert.ToInt32(this.neuSpread1_Sheet1.Cells[e.Row, (int)ColumnSet.ColOutNu].Text);
         this.neuSpread1_Sheet1.Cells[e.Row, (int)ColumnSet.ColEndNum].Text = (beginNum + tnNum + transferIn - transferOut - outNum).ToString();
     }
     else if (e.Column == (int)ColumnSet.ColEndNum)
     {
         Neusoft.HISFC.Models.HealthRecord.InpatientDayReport info = this.neuSpread1_Sheet1.Rows[e.Row].Tag as Neusoft.HISFC.Models.HealthRecord.InpatientDayReport;
         if (info == null)
         {
             return;
         }
         int    endNum   = FrameWork.Function.NConvert.ToInt32(this.neuSpread1_Sheet1.Cells[e.Row, (int)ColumnSet.ColEndNum].Text);
         string deptCode = info.ID;
         //DateTime lastDate = info.DateStat.Date;
         for (int i = e.Row + 1; i < this.neuSpread1_Sheet1.Rows.Count; i++)
         {
             Neusoft.HISFC.Models.HealthRecord.InpatientDayReport tmpInfo = this.neuSpread1_Sheet1.Rows[i].Tag as Neusoft.HISFC.Models.HealthRecord.InpatientDayReport;
             if (tmpInfo == null)
             {
                 continue;
             }
             string tmpDeptCode = tmpInfo.ID;
             //DateTime tmpDate = tmpInfo.DateStat.Date;
             if (tmpDeptCode == deptCode)
             {
                 int tmpEndNum   = FrameWork.Function.NConvert.ToInt32(this.neuSpread1_Sheet1.Cells[i, (int)ColumnSet.ColEndNum].Text);
                 int tmpBeginNum = FrameWork.Function.NConvert.ToInt32(this.neuSpread1_Sheet1.Cells[i, (int)ColumnSet.ColBeginNum].Text);
                 this.neuSpread1_Sheet1.Cells[i, (int)ColumnSet.ColBeginNum].Text = endNum.ToString();
                 this.neuSpread1_Sheet1.Cells[i, (int)ColumnSet.ColEndNum].Text   = (tmpEndNum + (endNum - tmpBeginNum)).ToString();
                 break;
             }
         }
     }
 }
コード例 #8
0
ファイル: ucQCScore.cs プロジェクト: ewin66/Management-System
 private void fpSpread2_Sheet1_CellChanged(object sender, FarPoint.Win.Spread.SheetViewEventArgs e)
 {
     if (e.Column == 5)
     {
         if (this.fpSpread2_Sheet1.Cells[e.Row, e.Column].Text.ToUpper() == "TRUE")
         {
             this.fpSpread2_Sheet1.Rows[e.Row].ForeColor = Color.Red;
         }
         else
         {
             this.fpSpread2_Sheet1.Rows[e.Row].ForeColor = Color.Black;
         }
         if (OnScoreChanged != null)
         {
             OnScoreChanged(sender, null);
         }
     }
 }
コード例 #9
0
 private void neuSpread1_Sheet1_CellChanged(object sender, FarPoint.Win.Spread.SheetViewEventArgs e)
 {
     if (e.Column == 1)//项目
     {
         if (this.neuSpread1_Sheet1.ActiveRowIndex < 0)
         {
             return;
         }
         try
         {
             if (this.neuSpread1_Sheet1.ActiveRow.Tag == null)
             {
                 return;
             }
             Neusoft.HISFC.Models.Base.Item obj = (Neusoft.HISFC.Models.Base.Item) this.neuSpread1_Sheet1.Rows[this.neuSpread1_Sheet1.ActiveRowIndex].Tag;
             obj.Qty /*.Amount*/ = decimal.Parse(this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.ActiveRowIndex, 1].Value.ToString());
             this.neuSpread1_Sheet1.Rows[this.neuSpread1_Sheet1.ActiveRowIndex].Tag = obj;
         }
         catch { }
     }
 }
コード例 #10
0
        private void fpSpread1_Sheet1_CellChanged(object sender, FarPoint.Win.Spread.SheetViewEventArgs e)
        {
            if (e.Column == 2)
            {
                string dllname = this.fpSpread1_Sheet1.Cells[e.Row, 2].Text;
                if (dllname == "")
                {
                    return;
                }
                try
                {
                    System.Reflection.Assembly assembly = System.Reflection.Assembly.LoadFrom(dllname + ".dll");
                    Type[] type = assembly.GetTypes();
                    FarPoint.Win.Spread.CellType.ComboBoxCellType funCellType = new FarPoint.Win.Spread.CellType.ComboBoxCellType();
                    string[] ss = new string[type.Length + 1];

                    int i = 0;
                    foreach (Type mytype in type)
                    {
                        if (mytype.IsPublic && mytype.IsClass)
                        {
                            ss[i] = mytype.ToString();
                            i++;
                        }
                    }
                    ss[i] = "";
                    funCellType.Editable = true;
                    funCellType.Items    = ss;
                    this.fpSpread1_Sheet1.Cells[e.Row, 3].CellType = funCellType;
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
            this.richTextBox2.Text = this.getRight();
        }
コード例 #11
0
 private void fpSpread1_Sheet1_CellChanged(object sender, FarPoint.Win.Spread.SheetViewEventArgs e)
 {
     if (e.Column == 3)
     {
         string dllname = this.fpSpread1_Sheet1.Cells[e.Row, 3].Text;
         if (dllname == "")
         {
             return;
         }
         try
         {
             System.Reflection.Assembly assembly = System.Reflection.Assembly.LoadFrom(dllname + ".dll");
             Type[] type = assembly.GetTypes();
             FarPoint.Win.Spread.CellType.ComboBoxCellType funCellType = new FarPoint.Win.Spread.CellType.ComboBoxCellType();
             string[] ss = new string[type.Length];
             int      i  = 0;
             foreach (Type mytype in type)
             {
                 if (mytype.IsPublic && mytype.IsClass)
                 {
                     ss[i] = mytype.ToString();
                     i++;
                 }
             }
             funCellType.Editable = true;
             funCellType.Items    = ss;
             this.fpSpread1_Sheet1.Cells[e.Row, 2].CellType = funCellType;
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message);
         }
     }
     else if (e.Column == 8)
     {
         string dllname = this.fpSpread1_Sheet1.Cells[e.Row, 8].Text;
         if (dllname == "")
         {
             return;
         }
         try
         {
             System.Reflection.Assembly assembly = System.Reflection.Assembly.LoadFrom(dllname + ".dll");
             Type[] type = assembly.GetTypes();
             FarPoint.Win.Spread.CellType.ComboBoxCellType funCellType = new FarPoint.Win.Spread.CellType.ComboBoxCellType();
             string[] ss = new string[type.Length];
             int      i  = 0;
             foreach (Type mytype in type)
             {
                 if (mytype.IsPublic && mytype.IsClass && mytype.IsSubclassOf(typeof(System.Windows.Forms.TreeView)))
                 {
                     ss[i] = mytype.ToString();
                     i++;
                 }
             }
             funCellType.Editable = true;
             funCellType.Items    = ss;
             this.fpSpread1_Sheet1.Cells[e.Row, 9].CellType = funCellType;
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message);
         }
     }
     IsDirty = true;
 }
コード例 #12
0
 /// <summary>
 /// 没处理,是为和SaveChangedRows一起使用的
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void fpDetails_CellChanged(object sender, FarPoint.Win.Spread.SheetViewEventArgs e)
 {
 }
コード例 #13
0
ファイル: frmCowList.cs プロジェクト: seksarnt/iBeef
 private void fpsSearchResult_Sheet1_RowChanged(object sender, FarPoint.Win.Spread.SheetViewEventArgs e)
 {
     this.tsbPrint.Enabled = (this.fpsSearchResult_Sheet1.RowCount > 0);
 }
コード例 #14
0
ファイル: ucInject.cs プロジェクト: ewin66/Management-System
 private void neuSpread2_Sheet1_CellChanged(object sender, FarPoint.Win.Spread.SheetViewEventArgs e)
 {
     //(this.neuSpread2_Sheet1.GetTag(e.Row,e.Column) as Neusoft.HISFC.Models.Nurse.InjectInfo).PrecontractDate =
 }