Ejemplo n.º 1
0
        private void bbtnList_ButtonClick(string name)
        {
            switch (name.ToUpper())
            {
            case "COPY":
                Copy();
                break;

            case "PASTE":
                Paste();
                break;

            case "SPC_MODIFY_MODEL":
                Modify();
                break;

            case "SPC_CONFIGURATION":
                ViewModel();
                break;

            case "SPC_VIEW_CHART":
                ViewChart();
                break;

            case "EXPORT":
                // this.bsprData.Export(true);
                BSpreadUtility bsprUtil = new BSpreadUtility();
                bsprUtil.Export(this.bsprData, true);
                break;
            }
        }
Ejemplo n.º 2
0
 public void InitializeVariable()
 {
     this._mlthandler     = MultiLanguageHandler.getInstance();
     this._Initialization = new Initialization();
     this._Initialization.InitializePath();
     this._bSpread = new BSpreadUtility();
 }
Ejemplo n.º 3
0
 public void InitializeVariable()
 {
     this._ws             = new WebServiceController <eSPCWebService.eSPCWebService>().Create();
     this._mlthandler     = MultiLanguageHandler.getInstance();
     this._Initialization = new Initialization();
     this._Initialization.InitializePath();
     this._bspreadutility = new BSpreadUtility();
     this._ComUtil        = new CommonUtility();
 }
Ejemplo n.º 4
0
        //public DataSet GetSelectedValueToDataSet()
        //{
        //    DataSet dsStep = new DataSet(Definition.CONDITION_KEY_STEP_NAME);
        //    if (_dtStep != null)
        //    {
        //        DataTable dtStep = _dtStep.Copy();
        //        dtStep.Rows.Clear();

        //        LinkedList list = new LinkedList();
        //        for (int i = 0; i < st_step.Rows.Count; i++)
        //        {
        //            if (bsprStep.GetCellValue(i, 0) != null)
        //            {
        //                string check = bsprStep.GetCellValue(i, 0).ToString();
        //                if (check.ToUpper() == ("true").ToUpper())
        //                {
        //                    dtStep.Rows.Add(_dtStep.Rows[i].ItemArray);
        //                }
        //            }
        //        }
        //        dsStep.Tables.Add(dtStep);
        //    }
        //    return dsStep;
        //}
        public DataSet GetSelectedValueToDataSet()
        {
            BSpreadUtility utility = new BSpreadUtility();
            DataSet        ds      = utility.GetSelectedDataSet(bsprStep, 0);

            ds.Tables[0].Columns[Definition.CONDITION_KEY_STEP_ID].ColumnName = Definition.DynamicCondition_Search_key.DISPLAYDATA;
            ds.Tables[0].Columns[Definition.CONDITION_KEY_RAWID].ColumnName   = Definition.DynamicCondition_Search_key.VALUEDATA;

            return(ds);
        }
Ejemplo n.º 5
0
 public void InitializePage()
 {
     this._ComUtil        = new CommonUtility();
     this._bSpreadUtil    = new BSpreadUtility();
     this._lang           = MultiLanguageHandler.getInstance();
     this._wsSPC          = new eSPCWebService.eSPCWebService();
     this._Initialization = new Initialization();
     this._Initialization.InitializePath();
     this.InitializeLayout();
 }
Ejemplo n.º 6
0
 public void InitializeVariable()
 {
     this._wsSPC          = new WebServiceController <eSPCWebService.eSPCWebService>().Create();
     this._mlthandler     = MultiLanguageHandler.getInstance();
     this._Initialization = new Initialization();
     this._Initialization.InitializePath();
     this._bspreadutility  = new BSpreadUtility();
     this._ComUtil         = new CommonUtility();
     this._llstData        = new LinkedList();
     this.strucContextList = new SPCStruct.ChartConditionContextList();
     this.strucContextinfo = new SPCStruct.ChartContextInfo();
 }
Ejemplo n.º 7
0
        public DataSet GetSelectedValueToDataSet()
        {
            BSpreadUtility utility = new BSpreadUtility();
            DataSet        ds      = utility.GetSelectedDataSet(bsprParam, 0);

            ds.Tables[0].Columns[Definition.CONDITION_KEY_MODEL_NAME].ColumnName = Definition.DynamicCondition_Search_key.DISPLAYDATA;
            if (ds.Tables[0].Columns[Definition.CONDITION_KEY_RAWID] == null)
            {
                ds.Tables[0].Columns.Add(Definition.CONDITION_KEY_RAWID, typeof(string));
            }
            ds.Tables[0].Columns[Definition.CONDITION_KEY_RAWID].ColumnName = Definition.DynamicCondition_Search_key.VALUEDATA;

            return(ds);
        }
Ejemplo n.º 8
0
        private void btn_Draw_Click(object sender, EventArgs e)
        {
            BSpreadUtility bUtil = new BSpreadUtility();

            DataTable dt_BsprData = new DataTable();

            dt_BsprData = ((DataSet)this.bspr_SeriesGrouping.ActiveSheet.DataSource).Tables[0];

            this.ParentUnitedChart.dt_SeriesGroup = dt_BsprData;

            this.DialogResult = DialogResult.OK;

            this.Close();
        }
Ejemplo n.º 9
0
        private void InitializeLayout()
        {
            List <Color> ChartColorList = this.ParentUnitedChart.Get_Chart().SeriesColor.ListColors;

            this.bspr_SeriesGrouping.DataSet = this.dt_BsprDataTable;

            BSpreadUtility bUtil = new BSpreadUtility();

            string[] saColor = new string[ChartColorList.Count];
            for (int i = 0; i < ChartColorList.Count; i++)
            {
                saColor.SetValue(ChartColorList[i].ToString(), i);
            }

            string[] saSymbol = new string[] {
                "Rectangle",
                "Circle",
                "Triangle",
                "DownTriangle",
                "Cross",
                "DiagCross",
                "Star",
                "Diamond",
                "SmallDot",
                "Nothing",
                "LeftTriangle",
                "RightTriangle",
                "Sphere",
                "PolishedSphere",
                "Hexagon"
            };
            //for (int i = 0; i < Steema.TeeChart.Styles.PointerStyles; i++)
            //{

            //}

            this.bspr_SeriesGrouping.DataSet = this.dt_BsprDataTable;

            for (int i = 0; i < dt_BsprDataTable.Rows.Count; i++)
            {
                bUtil.SetComboBoxCellType(this.bspr_SeriesGrouping.ActiveSheet.Cells[i, this._iColorColIndex], saColor, false);
                this.bspr_SeriesGrouping.ActiveSheet.Cells[i, this._iColorColIndex].Value = this.dt_BsprDataTable.Rows[i][Definition.COL_HEADER_KEY_COLOR].ToString();
                bUtil.SetComboBoxCellType(this.bspr_SeriesGrouping.ActiveSheet.Cells[i, this._iSymbolColIndex], saSymbol, false);
                this.bspr_SeriesGrouping.ActiveSheet.Cells[i, this._iSymbolColIndex].Value = this.dt_BsprDataTable.Rows[i][Definition.COL_HEADER_KEY_SYMBOL].ToString();
            }
        }
Ejemplo n.º 10
0
        public void InitializePopup()
        {
            this._wsSPC          = new WebServiceController <eSPCWebService.eSPCWebService>().Create();
            this._mlthandler     = MultiLanguageHandler.getInstance();
            this._Initialization = new Initialization();
            this._Initialization.InitializePath();

            this._SpreadUtil  = new BSpreadUtility();
            this._ComUtil     = new CommonUtility();
            this._SessionData = new SessionData();
            this._dsGroupList = new DataSet();

            this.Title = "Model Group Mapping";

            InitializeButtonList();
            InitializeSpread();
        }
Ejemplo n.º 11
0
        public MultiDataCondition()
        {
            this._wsSPC          = new WebServiceController <eSPCWebService.eSPCWebService>().Create();
            this._mlthandler     = MultiLanguageHandler.getInstance();
            this._comUtil        = new CommonUtility();
            this._Initialization = new Initialization();
            this._bspreadutility = new BSpreadUtility();

            InitializeComponent();
            this.dateCondition1      = new BISTel.eSPC.Condition.Controls.Date.DateCondition();
            this.dateCondition1.Dock = DockStyle.Fill;
            this.bTPnlPeriod.Controls.Add(dateCondition1);

            this.sortUC      = new SortingKey();
            this.sortUC.Dock = DockStyle.Fill;
            this.bTPnlSortingKey.Controls.Add(sortUC);
            this.PROC_BindSortingKey();
            this.bTPnlPeriod.Title     = _mlthandler.GetVariable(Definition.LABEL.PERIOD);
            this.bTPnlSortingKey.Title = _mlthandler.GetVariable(Definition.Analysis.LABEL_SORTING_KEY);

            InitializePage();
        }
Ejemplo n.º 12
0
        private void bbtnList_ButtonClick(string name)
        {
            LinkedList _llstPopup = null;
            DataTable  dtResource = null;

            try
            {
                if (!(this.bsprData.ActiveSheet.RowCount > 0))
                {
                    MSGHandler.DisplayMessage(MSGType.Information, MSGHandler.GetMessage(Definition.MSG_KEY_NO_SEARCH_DATA));
                    return;
                }


                if (name.ToUpper() == Definition.ButtonKey.EXPORT)
                {
                    BSpreadUtility bsprUtil = new BSpreadUtility();
                    bsprUtil.Export(this.bsprData, true);
                }
                else if (name.ToUpper().Equals("SELECT"))
                {
                    if (this.bsprData.ActiveSheet.SelectionCount > 0)
                    {
                        FarPoint.Win.Spread.Model.CellRange[] selections = this.bsprData.ActiveSheet.GetSelections();

                        for (int i = 0; i < selections[0].RowCount; i++)
                        {
                            this.bsprData.ActiveSheet.SetText(selections[0].Row + i, (int)BISTel.eSPC.Common.enum_OCAPLIST.SPC_V_SELECT, "True");
                        }
                    }
                }
                else if (name.ToUpper().Equals("UNSELECT"))
                {
                    if (this.bsprData.ActiveSheet.SelectionCount > 0)
                    {
                        FarPoint.Win.Spread.Model.CellRange[] selections = this.bsprData.ActiveSheet.GetSelections();

                        for (int i = 0; i < selections[0].RowCount; i++)
                        {
                            this.bsprData.ActiveSheet.SetText(selections[0].Row + i, (int)BISTel.eSPC.Common.enum_OCAPLIST.SPC_V_SELECT, "False");
                        }
                    }
                }
                else if (name.ToUpper() == Definition.ButtonKey.VIEW || name.ToUpper() == Definition.ButtonKey.OCAP_MODIFY)
                {
                    ArrayList alCheckRowIndex = _bSpreadUtil.GetCheckedRowIndex(this.bsprData, (int)BISTel.eSPC.Common.enum_OCAPLIST.SPC_V_SELECT);
                    if (alCheckRowIndex.Count == 0)
                    {
                        MSGHandler.DisplayMessage(MSGType.Information, "SPC_INFO_SELECT_ROW", null, null);
                        return;
                    }

                    if (name.ToUpper() == Definition.ButtonKey.VIEW)
                    {
                        this.ClickButtonOCAP(BISTel.eSPC.Common.enum_PopupType.View, alCheckRowIndex);
                    }
                    else if (name.ToUpper() == Definition.ButtonKey.OCAP_MODIFY)
                    {
                        this.ClickButtonOCAP(BISTel.eSPC.Common.enum_PopupType.Modify, alCheckRowIndex);
                    }
                }
                else if (name.ToUpper() == "SPC_REMOVE_DUPLICATE")
                {
                    if (this._bRemovedDuplicatedRow)
                    {
                        this.bsprData.ActiveSheet.Rows[0, this.bsprData.ActiveSheet.RowCount - 1].Visible = true;
                        this._bRemovedDuplicatedRow = false;
                    }
                    else
                    {
                        ArrayList arrDuplicatedRow = new ArrayList();
                        for (int i = 0; i < this.bsprData.ActiveSheet.RowCount; i++)
                        {
                            string strModelConfigRawID = this.bsprData.ActiveSheet.Cells[i, (int)BISTel.eSPC.Common.enum_OCAPLIST.MODEL_CONFIG_RAWID].Text;
                            if (arrDuplicatedRow.Contains(strModelConfigRawID))
                            {
                                this.bsprData.ActiveSheet.Rows[i].Visible = false;
                                if (this.bsprData.ActiveSheet.Cells[i, (int)BISTel.eSPC.Common.enum_OCAPLIST.SPC_V_SELECT].Text == "True")
                                {
                                    this.bsprData.ActiveSheet.Cells[i, (int)BISTel.eSPC.Common.enum_OCAPLIST.SPC_V_SELECT].Text = "False";
                                }
                            }
                            else
                            {
                                arrDuplicatedRow.Add(strModelConfigRawID);
                            }
                        }
                        this._bRemovedDuplicatedRow = true;
                    }
                }
                else
                {
                    ArrayList alCheckRowIndex = _bSpreadUtil.GetCheckedRowIndex(this.bsprData, (int)BISTel.eSPC.Common.enum_OCAPLIST.SPC_V_SELECT);
                    if (alCheckRowIndex.Count < 1 || alCheckRowIndex.Count > 1)
                    {
                        MSGHandler.DisplayMessage(MSGType.Information, MSGHandler.GetMessage("FDC_ALLOW_SINGLE_SELECTED_ROW"));
                        return;
                    }

                    _ChartVariable = new ChartInterface();
                    int iRowIndex = (int)alCheckRowIndex[0];
                    if (iRowIndex < 0)
                    {
                        return;
                    }


                    string strModelConfigRawID = this.bsprData.ActiveSheet.Cells[iRowIndex, (int)BISTel.eSPC.Common.enum_OCAPLIST.MODEL_CONFIG_RAWID].Text;
                    string strTime             = this.bsprData.ActiveSheet.Cells[iRowIndex, (int)BISTel.eSPC.Common.enum_OCAPLIST.TIME].Text;
                    string strocaprawid        = this.bsprData.ActiveSheet.Cells[iRowIndex, (int)BISTel.eSPC.Common.enum_OCAPLIST.OCAP_RAWID].Text;

                    //SPC-1292, KBLEE, START
                    if (this._llstSearchCondition.Contains(Definition.DynamicCondition_Condition_key.PARAM_TYPE_CD))
                    {
                        this._llstSearchCondition.Remove(Definition.DynamicCondition_Condition_key.PARAM_TYPE_CD);
                        this._llstSearchCondition.Add(Definition.DynamicCondition_Condition_key.PARAM_TYPE_CD, this.bsprData.ActiveSheet.Cells[iRowIndex, (int)BISTel.eSPC.Common.enum_OCAPLIST.PARAM_TYPE_CD].Text);
                    }
                    else
                    {
                        this._llstSearchCondition.Add(Definition.DynamicCondition_Condition_key.PARAM_TYPE_CD, this.bsprData.ActiveSheet.Cells[iRowIndex, (int)BISTel.eSPC.Common.enum_OCAPLIST.PARAM_TYPE_CD].Text);
                    }
                    //SPC-1292, KBLEE, END

                    DataRow drCurrent = this._dsOCAPList.Tables[0].Rows[iRowIndex];

                    _llstPopup = CommonPageUtil.GetOCAPParameter(this._dsOCAPList.Tables[0], iRowIndex);
                    dtResource = GetChartData(_llstPopup, strModelConfigRawID, iRowIndex);

                    List <string> rawIDs = new List <string>();
                    if (dtResource.Columns.Contains(Definition.CHART_COLUMN.OCAP_RAWID))
                    {
                        bool bPOcap  = dtResource.Columns.Contains(Definition.CHART_COLUMN.P_OCAP_LIST);
                        bool bPNOcap = dtResource.Columns.Contains(Definition.CHART_COLUMN.PN_OCAP_LIST);
                        bool bCOcap  = dtResource.Columns.Contains(Definition.CHART_COLUMN.C_OCAP_LIST);
                        bool bUOcap  = dtResource.Columns.Contains(Definition.CHART_COLUMN.U_OCAP_LIST);

                        foreach (DataRow dr in dtResource.Rows)
                        {
                            string rawid = dr[Definition.CHART_COLUMN.OCAP_RAWID].ToString();

                            string sTemp = rawid.Replace(";", "");
                            if (sTemp.Length > 0)
                            {
                                string[] ids = rawid.Split(';');
                                foreach (string id in ids)
                                {
                                    if (string.IsNullOrEmpty(id))
                                    {
                                        continue;
                                    }
                                    if (!rawIDs.Contains(id))
                                    {
                                        rawIDs.Add(id);
                                    }
                                }
                            }

                            if (bPOcap)
                            {
                                rawid = dr[Definition.CHART_COLUMN.P_OCAP_LIST].ToString();

                                sTemp = rawid.Replace("^", "").Replace(";", "");
                                if (sTemp.Length > 0)
                                {
                                    string[] ids = rawid.Replace(";", "^").Split('^');
                                    foreach (string id in ids)
                                    {
                                        if (string.IsNullOrEmpty(id))
                                        {
                                            continue;
                                        }
                                        if (!rawIDs.Contains(id))
                                        {
                                            rawIDs.Add(id);
                                        }
                                    }
                                }
                            }

                            if (bPNOcap)
                            {
                                rawid = dr[Definition.CHART_COLUMN.PN_OCAP_LIST].ToString();

                                sTemp = rawid.Replace("^", "");
                                if (sTemp.Length > 0)
                                {
                                    string[] ids = rawid.Split('^');
                                    foreach (string id in ids)
                                    {
                                        if (string.IsNullOrEmpty(id))
                                        {
                                            continue;
                                        }
                                        if (!rawIDs.Contains(id))
                                        {
                                            rawIDs.Add(id);
                                        }
                                    }
                                }
                            }

                            if (bCOcap)
                            {
                                rawid = dr[Definition.CHART_COLUMN.C_OCAP_LIST].ToString();

                                sTemp = rawid.Replace("^", "");
                                if (sTemp.Length > 0)
                                {
                                    string[] ids = rawid.Split('^');
                                    foreach (string id in ids)
                                    {
                                        if (string.IsNullOrEmpty(id))
                                        {
                                            continue;
                                        }
                                        if (!rawIDs.Contains(id))
                                        {
                                            rawIDs.Add(id);
                                        }
                                    }
                                }
                            }

                            if (bUOcap)
                            {
                                rawid = dr[Definition.CHART_COLUMN.U_OCAP_LIST].ToString();

                                sTemp = rawid.Replace("^", "");
                                if (sTemp.Length > 0)
                                {
                                    string[] ids = rawid.Split('^');
                                    foreach (string id in ids)
                                    {
                                        if (string.IsNullOrEmpty(id))
                                        {
                                            continue;
                                        }
                                        if (!rawIDs.Contains(id))
                                        {
                                            rawIDs.Add(id);
                                        }
                                    }
                                }
                            }
                        }

                        if (rawIDs.Count == 0)
                        {
                            rawIDs.Add("");
                        }

                        LinkedList llstTmpOcapComment = new LinkedList();
                        llstTmpOcapComment.Add(Definition.CONDITION_KEY_OOC_TRX_SPC_RAWID, rawIDs.ToArray());

                        if (this._llstSearchCondition[Definition.DynamicCondition_Condition_key.START_DTTS] != null)
                        {
                            llstTmpOcapComment.Add(Definition.CONDITION_KEY_START_DTTS, (DateTime.Parse(this._llstSearchCondition[Definition.DynamicCondition_Condition_key.START_DTTS].ToString())).ToString(Definition.DATETIME_FORMAT_MS));
                        }
                        if (this._llstSearchCondition[Definition.DynamicCondition_Condition_key.END_DTTS] != null)
                        {
                            llstTmpOcapComment.Add(Definition.CONDITION_KEY_END_DTTS, (DateTime.Parse(this._llstSearchCondition[Definition.DynamicCondition_Condition_key.END_DTTS].ToString())).ToString(Definition.DATETIME_FORMAT_MS));
                        }

                        byte[] baData = llstTmpOcapComment.GetSerialData();

                        _dsOcapComment = _wsSPC.GetOCAPCommentList_New(baData);
                    }

                    if (DataUtil.IsNullOrEmptyDataTable(dtResource))
                    {
                        this.MsgClose();
                        MSGHandler.DisplayMessage(MSGType.Warning, MSGHandler.GetMessage("INFORMATION_NODATA"));
                        return;
                    }

                    if (lineName.ContainsKey(this.bsprData.ActiveSheet.Cells[iRowIndex, (int)BISTel.eSPC.Common.enum_OCAPLIST.LINE].Text))
                    {
                        _ChartVariable.LINE = lineName[this.bsprData.ActiveSheet.Cells[iRowIndex, (int)BISTel.eSPC.Common.enum_OCAPLIST.LINE].Text];
                    }
                    _ChartVariable.AREA                  = this.bsprData.ActiveSheet.Cells[iRowIndex, (int)BISTel.eSPC.Common.enum_OCAPLIST.AREA].Text;
                    _ChartVariable.SPC_MODEL             = this.bsprData.ActiveSheet.Cells[iRowIndex, (int)BISTel.eSPC.Common.enum_OCAPLIST.SPC_MODEL_NAME].Text;
                    _ChartVariable.PARAM_ALIAS           = this.bsprData.ActiveSheet.Cells[iRowIndex, (int)BISTel.eSPC.Common.enum_OCAPLIST.PARAM_ALIAS].Text;
                    _ChartVariable.OPERATION_ID          = this.bsprData.ActiveSheet.Cells[iRowIndex, (int)BISTel.eSPC.Common.enum_OCAPLIST.OPERATION_ID].Text;
                    _ChartVariable.PRODUCT_ID            = this.bsprData.ActiveSheet.Cells[iRowIndex, (int)BISTel.eSPC.Common.enum_OCAPLIST.PRODUCT_ID].Text;
                    _ChartVariable.llstInfoCondition     = _llstPopup;
                    _ChartVariable.DEFAULT_CHART         = this.bsprData.ActiveSheet.Cells[iRowIndex, (int)BISTel.eSPC.Common.enum_OCAPLIST.DEFAULT_CHART_LIST].Text;
                    _ChartVariable.complex_yn            = Definition.VARIABLE_Y;
                    _ChartVariable.MODEL_CONFIG_RAWID    = strModelConfigRawID;
                    _ChartVariable.MAIN_YN               = this.bsprData.ActiveSheet.Cells[iRowIndex, (int)BISTel.eSPC.Common.enum_OCAPLIST.MAIN_YN].Text;
                    _ChartVariable.dtResource            = dtResource;
                    _ChartVariable.CHART_PARENT_MODE     = BISTel.eSPC.Common.CHART_PARENT_MODE.OCAP;
                    _ChartVariable.dateTimeStart         = DateTime.Parse(this._llstSearchCondition[Definition.DynamicCondition_Condition_key.START_DTTS].ToString());
                    _ChartVariable.dateTimeEnd           = DateTime.Parse(this._llstSearchCondition[Definition.DynamicCondition_Condition_key.END_DTTS].ToString());
                    _ChartVariable.llstDTSelectCondition = this._llstDTSelectCondition;
                    _ChartVariable.OCAPRawID             = strocaprawid;

                    this._lineRawid = this.bsprData.ActiveSheet.Cells[iRowIndex, (int)BISTel.eSPC.Common.enum_OCAPLIST.LINE].Text;
                    this._areaRawid = this.bsprData.ActiveSheet.Cells[iRowIndex, (int)BISTel.eSPC.Common.enum_OCAPLIST.AREA_RAWID].Text;

                    if (name.ToUpper() == Definition.ButtonKey.VIEW_CHART)
                    {
                        this.ClickButtonChartView();
                    }
                }
            }
            catch (Exception ex)
            {
                MSGHandler.DisplayMessage(MSGType.Error, ex.Message);
            }
            finally
            {
                if (dtResource != null)
                {
                    dtResource.Dispose();
                }

                _llstPopup     = null;
                _ChartVariable = null;
            }
        }