Example #1
0
        private void TableModules_SelectionChanged(object sender, FarPoint.Win.Spread.SelectionChangedEventArgs e)
        {
            DocumentCache     = null;
            SheetsCache       = null;
            SelectionModule   = null;
            NeedSynchronous   = false;
            SelectionModuleID = GetSelectionModuleID();

            if (Modules != null)
            {
                SelectionModule = Modules.Rows.Find(SelectionModuleID);
            }

            SetStatisticsTable();
        }
Example #2
0
        private void Table_SelectionChanged(object sender, FarPoint.Win.Spread.SelectionChangedEventArgs e)
        {
            if (e.Range.RowCount == 1)
            {
                var row = Sheet.Rows[e.Range.Row];
                var id  = new Guid(row.Tag.ToString());
                if (id == null)
                {
                    return;
                }

                ShowLabel(id);
            }
            else
            {
                tb_process.Text = tb_reason.Text = lb_process.Text = lb_reason.Text = "";
            }
        }
Example #3
0
 private void Table_SelectionChanged(object sender, FarPoint.Win.Spread.SelectionChangedEventArgs e)
 {
     if (e.Range.Row > 0)
     {
         string ID  = "";
         var    row = Sheet.Rows[e.Range.Row];
         if (row == null)
         {
             return;
         }
         ID = row.Tag.ToString();
         DataTable dt = CaiJiHelperClient.GetTestOverTimeByID(new Guid(ID));
         if (dt != null && dt.Rows.Count > 0)
         {
             tb_reason.Text = (dt.Rows[0]["SGComment"] ?? "").ToString();
         }
     }
     else
     {
         tb_reason.Text = "";
     }
 }
Example #4
0
        void FpSpread_SelectionChanged(object sender, FarPoint.Win.Spread.SelectionChangedEventArgs e)
        {
            if (ActiveElement != null)
            {
                panel1.Visible = (ActiveElement.Value is DataColumn);

                //扩展属性
                if (ActiveElement.ExpandOrientation.Orientation == ExpandOrientation.LeftToRight)
                {
                    rButton_LeftToRight.Checked = true;
                }
                else if (ActiveElement.ExpandOrientation.Orientation == ExpandOrientation.TopToBottom)
                {
                    rButton_TopToBottom.Checked = true;
                }
                else if (ActiveElement.ExpandOrientation.Orientation == ExpandOrientation.None)
                {
                    rButton_None.Checked = true;
                }

                //数据列属性
                if (ActiveElement.Value is DataColumn)
                {
                    DataColumn data = ActiveElement.Value as DataColumn;

                    rButton_LeftToRight.Enabled = (data.DataSetting != DataSetting.Aggregation);
                    rButton_TopToBottom.Enabled = (data.DataSetting != DataSetting.Aggregation);
                    rButton_None.Enabled        = (data.DataSetting != DataSetting.Aggregation);

                    if (data.DataSetting == DataSetting.List)
                    {
                        rButton_List.Checked = true;
                    }
                    else if (data.DataSetting == DataSetting.Group)
                    {
                        rButton_Group.Checked = true;
                    }
                    else if (data.DataSetting == DataSetting.Aggregation)
                    {
                        rButton_Aggregation.Checked  = true;
                        cBoxAggregation.SelectedItem = data.FunctionInfo;
                    }
                }

                //左父格属性
                if (ActiveElement.ExpandOrientation.isDefaultLeftParent)
                {
                    LeftCoordControl.setValue(ValueSource.Default, "");
                }
                else
                {
                    ValueSource source = (ActiveElement.ExpandOrientation.LeftParent == "" ? ValueSource.None : ValueSource.UseDefined);
                    Cell        Cell   = Report.ReportSheet.GetCellFromTag(null, ActiveElement.ExpandOrientation.LeftParent);
                    String      cell   = "";
                    if (Cell != null)
                    {
                        cell = Arabic_Numerals_Convert.Excel_Word_Numerals(Cell.Column.Index) + (Cell.Row.Index + 1).ToString();
                    }
                    LeftCoordControl.setValue(source, cell);
                }

                //上父格
                if (ActiveElement.ExpandOrientation.isDefaultTopParent)
                {
                    TopCoordControl.setValue(ValueSource.Default, "");
                }
                else
                {
                    ValueSource source = (ActiveElement.ExpandOrientation.TopParent == "" ? ValueSource.None : ValueSource.UseDefined);
                    Cell        Cell   = Report.ReportSheet.GetCellFromTag(null, ActiveElement.ExpandOrientation.TopParent);
                    String      cell   = "";
                    if (Cell != null)
                    {
                        cell = Arabic_Numerals_Convert.Excel_Word_Numerals(Cell.Column.Index) + (Cell.Row.Index + 1).ToString();
                    }

                    TopCoordControl.setValue(source, cell);
                }
            }
        }
Example #5
0
 private void Cells_SelectionChanged(object sender, FarPoint.Win.Spread.SelectionChangedEventArgs e)
 {
 }