コード例 #1
0
        private void btnView_Click(object sender, EventArgs e)
        {
            DataTable dt = null;

            if (CheckField() == false)
            {
                return;
            }

            GridColumnInit();

            try
            {
                LoadingPopUp.LoadIngPopUpShow(this);
                this.Refresh();

                dt = CmnFunction.oComm.GetFuncDataTable("DYNAMIC", MakeSqlString(0));

                if (dt.Rows.Count == 0)
                {
                    dt.Dispose();
                    LoadingPopUp.LoadingPopUpHidden();
                    CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD010", GlobalVariable.gcLanguage));
                    return;
                }

                //by John
                //1.Griid 합계 표시
                spdData.DataSource = dt;
                spdData.RPT_ColumnConfigFromTable(btnSort);

                //2. 칼럼 고정(필요하다면..)
                //spdData.Sheets[0].FrozenColumnCount = 10;

                //3. Total부분 셀머지
                //spdData.RPT_FillDataSelectiveCells("Total", 0, 4, 0, 9, true, Align.Center, VerticalAlign.Center);

                //4. Column Auto Fit4
                spdData.RPT_AutoFit(false);

                // 1번 그래프 그리도록 이벤트 발생
                //cboChart.SelectedIndex = 0;
            }
            catch (Exception ex)
            {
                LoadingPopUp.LoadingPopUpHidden();
                CmnFunction.ShowMsgBox(ex.Message);
            }
            finally
            {
                LoadingPopUp.LoadingPopUpHidden();
            }
        }
コード例 #2
0
        /// <summary>
        /// 조회
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnView_Click(object sender, EventArgs e)
        {
            //if (!CheckField()) return;

            DataTable dt = null;

            GridColumnInit();

            try
            {
                LoadingPopUp.LoadIngPopUpShow(this);
                spdData_Sheet1.RowCount = 0;
                this.Refresh();
                dt = CmnFunction.oComm.GetFuncDataTable("DYNAMIC", MakeSqlString());

                if (dt.Rows.Count == 0)
                {
                    dt.Dispose();
                    LoadingPopUp.LoadingPopUpHidden();
                    CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD010", GlobalVariable.gcLanguage));
                    return;
                }

                spdData.DataSource = dt;

                //그루핑 순서 1순위만 SubTotal을 사용하기 위해서 첫번째 값을 가져옴
                //int sub = ((udcTableForm)(this.btnSort.BindingForm)).GetCheckedValue(2);

                ////by John (한줄짜리)
                ////1.Griid 합계 표시
                //int[] rowType = spdData.RPT_DataBindingWithSubTotal(dt, 0, sub + 1, 9, null, null, btnSort);

                ////2. 칼럼 고정(필요하다면..)
                //spdData.Sheets[0].FrozenColumnCount = 10;

                ////3. Total부분 셀머지
                //spdData.RPT_FillDataSelectiveCells("Total", 0, 9, 0, 1, true, Align.Center, VerticalAlign.Center);

                //4. Column Auto Fit
                spdData.RPT_AutoFit(false);

                dt.Dispose();
            }
            catch (Exception ex)
            {
                LoadingPopUp.LoadingPopUpHidden();
                CmnFunction.ShowMsgBox(ex.Message);
            }
            finally
            {
                LoadingPopUp.LoadingPopUpHidden();
            }
        }
コード例 #3
0
        /// <summary>
        /// 3.조회
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnView_Click(object sender, EventArgs e)
        {
            if (!CheckField())
            {
                return;
            }

            DataTable dt = null;

            GridColumnInit();

            try
            {
                LoadingPopUp.LoadIngPopUpShow(this);
                spdData_Sheet1.RowCount = 0;

                this.Refresh();
                dt = CmnFunction.oComm.GetFuncDataTable("DYNAMIC", MakeSqlString());

                if (dt.Rows.Count == 0)
                {
                    dt.Dispose();
                    LoadingPopUp.LoadingPopUpHidden();
                    CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD010", GlobalVariable.gcLanguage));
                    return;
                }

                //그루핑 순서 1순위만 SubTotal을 사용하기 위해서 첫번째 값을 가져옴
                int sub = ((udcTableForm)(this.btnSort.BindingForm)).GetCheckedValue(2);

                int[] rowType = spdData.RPT_DataBindingWithSubTotalAndDivideRows(dt, 0, sub + 1, 8, 9, 3, cdvFromToDate.SubtractBetweenFromToDate + 1, btnSort);
                spdData.RPT_FillDataSelectiveCells("Total", 0, 8, 0, 3, true, Align.Center, VerticalAlign.Center);
                spdData.RPT_FillColumnData(8, new string[] { "IN", "OUT", "YIELD" });
                spdData.RPT_AutoFit(false);

                for (int i = 0; i < cdvFromToDate.SubtractBetweenFromToDate + 1; i++)
                {
                    SetGrandYield(4, cdvFromToDate.SubtractBetweenFromToDate + 9 - i);
                }


                dt.Dispose();
            }
            catch (Exception ex)
            {
                LoadingPopUp.LoadingPopUpHidden();
                CmnFunction.ShowMsgBox(ex.Message);
            }
            finally
            {
                LoadingPopUp.LoadingPopUpHidden();
            }
        }
コード例 #4
0
ファイル: PRD010409.cs プロジェクト: trantan490/web
        /// <summary>
        /// Excel Export
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnExcelExport_Click(object sender, EventArgs e)
        {
            if (spdData.ActiveSheet.Rows.Count == 0)
            {
                CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD002", GlobalVariable.gcLanguage));
                return;
            }

            // Excel 바로 보이기
            //ExcelHelper.Instance.subMakeExcel(spdData, this.lblTitle.Text, " ^ ", " ^ ", true);
            spdData.ExportExcel();
        }
コード例 #5
0
ファイル: PRD010210.cs プロジェクト: trantan490/web
        /// <summary>
        /// 6. View 버튼 Action
        /// </summary>        ///
        private void btnView_Click(object sender, EventArgs e)
        {
            DataTable dt = null;

            if (CheckField() == false)
            {
                return;
            }

            GridColumnInit();
            spdData_Sheet1.RowCount = 0;

            try
            {
                LoadingPopUp.LoadIngPopUpShow(this);
                dt = CmnFunction.oComm.GetFuncDataTable("DYNAMIC", MakeSqlString());

                if (dt.Rows.Count == 0)
                {
                    dt.Dispose();
                    LoadingPopUp.LoadingPopUpHidden();
                    CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD010", GlobalVariable.gcLanguage));
                    return;
                }

                //그루핑 순서 1순위만 SubTotal을 사용하기 위해서 첫번째 값을 가져옴
                int sub = ((udcTableForm)(this.btnSort.BindingForm)).GetCheckedValue(2);

                int[] rowType = spdData.RPT_DataBindingWithSubTotal(dt, 0, sub + 1, 12, null, null, btnSort);
                //데이타테이블, 토탈 시작할 셀넘버, 시작 부터 서브토탈 몇개 쓸건지, 첫셀부터 몇번째 셀까지 TOTAL 적용안함
                //spdData.Sheets[0].FrozenColumnCount = 3;
                //spdData.RPT_AutoFit(false);

                //Total부분 셀머지
                spdData.RPT_FillDataSelectiveCells("Total", 0, 12, 0, 1, true, Align.Center, VerticalAlign.Center);

                spdData.RPT_AutoFit(false);

                spdData.RPT_SetPerSubTotalAndGrandTotal(0, 13, 12, 15);

                dt.Dispose();
            }
            catch (Exception ex)
            {
                LoadingPopUp.LoadingPopUpHidden();
                CmnFunction.ShowMsgBox(ex.Message);
            }
            finally
            {
                LoadingPopUp.LoadingPopUpHidden();
            }
        }
コード例 #6
0
        /// <summary>
        /// 6. View ¹öÆ° Action
        /// </summary>        ///
        private void btnView_Click(object sender, EventArgs e)
        {
            DataTable dt = null;

            if (CheckField() == false)
            {
                return;
            }

            GridColumnInit();
            spdData_Sheet1.RowCount = 0;

            try
            {
                LoadingPopUp.LoadIngPopUpShow(this);
                dt = CmnFunction.oComm.GetFuncDataTable("DYNAMIC", MakeSqlString());

                if (dt.Rows.Count == 0)
                {
                    dt.Dispose();
                    LoadingPopUp.LoadingPopUpHidden();
                    CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD010", GlobalVariable.gcLanguage));
                    return;
                }

                //±×·çÇÎ ¼ø¼­ 1¼øÀ§¸¸ SubTotalÀ» »ç¿ëÇϱâ À§Çؼ­ ù¹ø° °ªÀ» °¡Á®¿È
                //int sub = ((udcTableForm)(this.btnSort.BindingForm)).GetCheckedValue(2);

                //int[] rowType = spdData.RPT_DataBindingWithSubTotal(dt, 0, sub+1, 11, null, null, btnSort);
                //µ¥ÀÌŸÅ×À̺í, ÅäÅ» ½ÃÀÛÇÒ ¼¿³Ñ¹ö, ½ÃÀÛ ºÎÅÍ ¼­ºêÅäÅ» ¸î°³ ¾µ°ÇÁö, ù¼¿ºÎÅÍ ¸î¹ø° ¼¿±îÁö TOTAL Àû¿ë¾ÈÇÔ
                //spdData.Sheets[0].FrozenColumnCount = 3;
                //spdData.RPT_AutoFit(false);

                //TotalºÎºÐ ¼¿¸ÓÁö
                //spdData.RPT_FillDataSelectiveCells("Total", 0, 11, 0, 1, true, Align.Center, VerticalAlign.Center);

                spdData.DataSource = dt;

                spdData.RPT_AutoFit(false);

                dt.Dispose();
            }
            catch (Exception ex)
            {
                LoadingPopUp.LoadingPopUpHidden();
                CmnFunction.ShowMsgBox(ex.Message);
            }
            finally
            {
                LoadingPopUp.LoadingPopUpHidden();
            }
        }
コード例 #7
0
ファイル: SEC1102.cs プロジェクト: trantan490/web
        /// <summary>
        /// Insert RWEBGRPDEF Table.
        /// </summary>
        /// <returns>bool : True or False</returns>
        private bool Create_Security_Group()
        {
            string    QueryCond, InsertValue = "";
            string    sysCurrentDate;
            DataTable rtDataTable = new DataTable();

            try
            {
                sysCurrentDate = "";
                sysCurrentDate = CmnFunction.GetSysDateTime();
                if (sysCurrentDate == null)
                {
                    CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD000", GlobalVariable.gcLanguage));
                    return(false);
                }

                QueryCond = "";
                QueryCond = FwxCmnFunction.PackCondition(QueryCond, GlobalVariable.gsCentralFactory);
                QueryCond = FwxCmnFunction.PackCondition(QueryCond, txtSecGrp.Text);

                rtDataTable = CmnFunction.oComm.SelectData("RWEBGRPDEF", "1", QueryCond);
                if (rtDataTable.Rows.Count < 0)
                {
                    CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD016", GlobalVariable.gcLanguage));
                    return(false);
                }
                else
                {
                    InsertValue = "";
                    InsertValue = FwxCmnFunction.PackCondition(InsertValue, GlobalVariable.gsCentralFactory);
                    InsertValue = FwxCmnFunction.PackCondition(InsertValue, txtSecGrp.Text.Trim());
                    InsertValue = FwxCmnFunction.PackCondition(InsertValue, txtDesc.Text.Trim());
                    InsertValue = FwxCmnFunction.PackCondition(InsertValue, GlobalVariable.gsUserID);
                    InsertValue = FwxCmnFunction.PackCondition(InsertValue, sysCurrentDate);
                    InsertValue = FwxCmnFunction.PackCondition(InsertValue, "");
                    InsertValue = FwxCmnFunction.PackCondition(InsertValue, "");

                    if (CmnFunction.oComm.InsertData("RWEBGRPDEF", "1", InsertValue) != true)
                    {
                        CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD000", GlobalVariable.gcLanguage));
                        return(false);
                    }

                    return(true);
                }
            }
            catch (Exception ex)
            {
                CmnFunction.ShowMsgBox("SEC1102.Create_Security_Group() : " + ex.ToString());
                return(false);
            }
        }
コード例 #8
0
        public double RPT_4_AddData(DataTable dt, int[] Rows, int[] Columns, SeriseType SerType, DataTypes type)
        {
            double Max = 0;

            try
            {
                // Serise Type 으로 Row 선택한 경우
                if (SerType == SeriseType.Rows)
                {
                    for (int serise = 0; serise < Rows.Length; serise++, SerCount++)
                    {
                        for (int x = 0; x < Columns.Length; x++)
                        {
                            if (dt.Rows[Rows[serise]][Columns[x]] != null && dt.Rows[Rows[serise]][Columns[x]] != DBNull.Value)
                            {
                                //this.Value[x, SerCount] = Convert.ToDouble(dt.Rows[Rows[serise]][Columns[x]]) * GetCrossValue(type);
                                //Max = Math.Max(Max, this.Value[x, SerCount]);

                                this.Series[x].Points.AddXY(dt.Rows[Rows[serise]][x].ToString(), dt.Rows[Rows[serise]][Columns[x]].ToString());
                                //chart1.Series[0].Points.AddXY(dt_graph.Columns[i + 1].ToString(), Convert.ToInt32(dt_graph.Rows[0][i + 1]));
                                Max = Math.Max(Max, this.Series[x].Points.FindMaxByValue().YValues[0]);
                            }
                        }
                    }
                }
                else
                {
                    // Serise Type 으로 컬럼을 선택한 경우
                    for (int serise = 0; serise < Columns.Length; serise++, SerCount++)
                    {
                        for (int x = 0; x < Rows.Length; x++)
                        {
                            if (dt.Rows[Rows[x]][Columns[serise]] != null && dt.Rows[Rows[x]][Columns[serise]] != DBNull.Value)
                            {
                                //this.Value[SerCount, x] = Convert.ToDouble(dt.Rows[Rows[x]][Columns[serise]]) * GetCrossValue(type);
                                //Max = Math.Max(Max, this.Value[SerCount, x]);

                                this.Series[SerCount].Points.AddXY(dt.Rows[Rows[x]][serise].ToString(), dt.Rows[Rows[x]][Columns[serise]].ToString());
                                //this.Series[serise].Points.AddXY(Convert.ToDouble(dt.Rows[x][serise]), Convert.ToDouble(dt.Rows[x][serise + 1]));
                                Max = Math.Max(Max, this.Series[SerCount].Points.FindMaxByValue().YValues[0]);
                            }
                        }
                    }
                }

                return(Max);
            }
            catch (Exception ex)
            {
                throw new Exception(RptMessages.GetMessage("STD096", GlobalVariable.gcLanguage) + ex.Message);
            }
        }
コード例 #9
0
        // x 축 좌표 셋팅
        public void RPT_7_SetXAsixTitle(string[] Titles)
        {
            if (XCount < Titles.Length)
            {
                throw new Exception(RptMessages.GetMessage("STD084", GlobalVariable.gcLanguage) + XCount.ToString());
            }

            for (int i = 0; i < Titles.Length; i++)
            {
                this.Series[0].Points[i].AxisLabel = Titles[i];
            }
            //this.Legend[i] = Titles[i];
        }
コード例 #10
0
        public void RPT_7_SetXAsixTitleUsingSpreadHeader(FpSpread spread, int startHeaderRow, int[] HeaderColumn)
        {
            if (XCount < HeaderColumn.Length)
            {
                throw new Exception(RptMessages.GetMessage("STD084", GlobalVariable.gcLanguage) + XCount.ToString());
            }

            for (int i = 0; i < HeaderColumn.Length; i++)
            {
                this.Series[0].Points[i].AxisLabel = spread.ActiveSheet.ColumnHeader.Cells[startHeaderRow, HeaderColumn[i]].Text;
            }
            //this.Legend[i] = spread.ActiveSheet.ColumnHeader.Cells[startHeaderRow, HeaderColumn[i]].Text;
        }
コード例 #11
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (CmnFunction.ShowMsgBox(RptMessages.GetMessage("INF002", GlobalVariable.gcLanguage), "", MessageBoxButtons.YesNo, 2) != System.Windows.Forms.DialogResult.Yes)
            {
                return;
            }

            if (Update_EQErr_Data("DELETE") == true)
            {
                CmnFunction.ShowMsgBox(RptMessages.GetMessage("INF001", GlobalVariable.gcLanguage));
                View_EQErr_List();
            }
        }
コード例 #12
0
        public double RPT_4_AddData(FpSpread spread, int[] Rows, int[] Columns, SeriseType SerType, DataTypes type)
        {
            double Max = 0;

            try
            {
                // Serise Type 으로 Row 선택한 경우
                if (SerType == SeriseType.Rows)
                {
                    for (int serise = 0; serise < Rows.Length; serise++, SerCount++)
                    {
                        for (int x = 0; x < Columns.Length; x++)
                        {
                            //this.Value[SerCount, x] = Convert.ToDouble(spread.ActiveSheet.Cells[Rows[serise], Columns[x]].Value) * GetCrossValue(type);
                            //Max = Math.Max(Max, this.Value[SerCount, x]);

                            //if (spread.ActiveSheet.Cells[Rows[serise], Columns[x]].Value != null && spread.ActiveSheet.Cells[Rows[serise], Columns[x]].Value != DBNull.Value)
                            //{
                            //this.Series[SerCount].Points.AddXY(spread.ActiveSheet.Cells[Rows[serise], x].Value, spread.ActiveSheet.Cells[Rows[serise], Columns[x]].Value);
                            this.Series[SerCount].Points.AddY(Convert.ToDouble(spread.ActiveSheet.Cells[Rows[serise], Columns[x]].Value) * GetCrossValue(type));
                            Max = Math.Max(Max, this.Series[SerCount].Points.FindMaxByValue().YValues[0]);
                            //Max

                            //}
                        }
                    }
                }
                else
                {
                    // Serise Type 으로 컬럼을 선택한 경우
                    for (int serise = 0; serise < Columns.Length; serise++, SerCount++)
                    {
                        for (int x = 0; x < Rows.Length; x++)
                        {
                            //this.Value[SerCount, x] = Convert.ToDouble(spread.ActiveSheet.Cells[Rows[x], Columns[serise]].Value) * GetCrossValue(type);
                            //Max = Math.Max(Max, this.Value[SerCount, x]);

                            this.Series[SerCount].Points.AddY(Convert.ToDouble(spread.ActiveSheet.Cells[Rows[x], Columns[serise]].Value) * GetCrossValue(type));
                            Max = Math.Max(Max, this.Series[SerCount].Points.FindMaxByValue().YValues[0]);
                            // Max
                        }
                    }
                }

                return(Max);
            }
            catch (Exception ex)
            {
                throw new Exception(RptMessages.GetMessage("STD096", GlobalVariable.gcLanguage) + ex.Message);
            }
        }
コード例 #13
0
ファイル: PRD010418.cs プロジェクト: trantan490/web
        private void btnView_Click(object sender, EventArgs e)
        {
            DataTable dt = null;

            if (CheckField() == false)
            {
                return;
            }

            GridColumnInit();

            spdData_Sheet1.RowCount = 0;

            try
            {
                LoadingPopUp.LoadIngPopUpShow(this);

                this.Refresh();

                dt = CmnFunction.oComm.GetFuncDataTable("DYNAMIC", MakeSqlString());

                if (dt.Rows.Count == 0)
                {
                    dt.Dispose();
                    LoadingPopUp.LoadingPopUpHidden();
                    CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD010", GlobalVariable.gcLanguage));
                    return;
                }

                spdData.DataSource = dt;

                for (int i = 1; i < spdData.ActiveSheet.Rows.Count; i++)
                {
                    if (spdData.ActiveSheet.Cells[i, 6].Value.Equals("Y"))
                    {
                        spdData.ActiveSheet.Rows[i].BackColor = Color.Red;
                    }
                }
                //4. Column Auto Fit
                spdData.RPT_AutoFit(false);
            }
            catch (Exception ex)
            {
                LoadingPopUp.LoadingPopUpHidden();
                CmnFunction.ShowMsgBox(ex.Message);
            }
            finally
            {
                LoadingPopUp.LoadingPopUpHidden();
            }
        }
コード例 #14
0
        private void btnView_Click(object sender, EventArgs e)
        {
            if (CheckField() == false)
            {
                return;
            }

            DataTable dt = null;

            GridColumnInit();

            try
            {
                spdData_Sheet1.RowCount = 0;
                this.Refresh();
                LoadingPopUp.LoadIngPopUpShow(this);
                dt = CmnFunction.oComm.GetFuncDataTable("DYNAMIC", MakeSqlString());

                if (dt.Rows.Count == 0)
                {
                    dt.Dispose();
                    LoadingPopUp.LoadingPopUpHidden();
                    CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD010", GlobalVariable.gcLanguage));
                    return;
                }

                ////by John (한줄짜리)
                ////1.Griid 합계 표시
                int[] rowType = spdData.RPT_DataBindingWithSubTotal(dt, 0, 1, 11, null, null, btnSort);
                // 토탈 시작할 셀넘버, 시작 부터 서브토탈 몇개 쓸건지, 첫셀부터 몇번째 셀까지 TOTAL 적용안함


                ////2. 칼럼 고정(필요하다면..)
                //spdData.Sheets[0].FrozenColumnCount = 9;

                ////3. Total부분 셀머지
                spdData.RPT_FillDataSelectiveCells("Total", 0, 11, 0, 1, true, Align.Center, VerticalAlign.Center);

                //4. Column Auto Fit
                spdData.RPT_AutoFit(false);
            }
            catch (Exception ex)
            {
                LoadingPopUp.LoadingPopUpHidden();
                CmnFunction.ShowMsgBox(ex.Message);
            }
            finally
            {
                LoadingPopUp.LoadingPopUpHidden();
            }
        }
コード例 #15
0
 private Boolean CheckField()
 {
     if (cdvFactory.Text.TrimEnd() == "")
     {
         CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD001", GlobalVariable.gcLanguage));
         return(false);
     }
     if (cdvOper.FromText.TrimEnd() == "" || cdvOper.ToText.TrimEnd() == "")
     {
         CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD005", GlobalVariable.gcLanguage));
         return(false);
     }
     return(true);
 }
コード例 #16
0
ファイル: MAT070602.cs プロジェクト: trantan490/web
        private void btnView_Click(object sender, EventArgs e)
        {
            //DurationTime_Check();

            DataTable dt = null;

            if (CheckField() == false)
            {
                return;
            }

            spdData_Sheet1.RowCount = 0;

            try
            {
                LoadingPopUp.LoadIngPopUpShow(this);
                this.Refresh();


                dt = CmnFunction.oComm.GetFuncDataTable("DYNAMIC", MakeSqlString());
                GridColumnInit();

                if (dt.Rows.Count == 0)
                {
                    dt.Dispose();
                    LoadingPopUp.LoadingPopUpHidden();
                    CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD010", GlobalVariable.gcLanguage));
                    return;
                }

                int[] rowType = spdData.RPT_DataBindingWithSubTotalAndDivideRows(dt, 0, 1, 3, 4, 5, cdvOper.SelectCount, btnSort);

                //3. Total부분 셀머지
                spdData.RPT_FillDataSelectiveCells("Total", 0, 3, 0, 5, true, Align.Center, VerticalAlign.Center);

                spdData.RPT_FillColumnData(3, new string[] { "BOH", "IN", "OUT", "EOH", "LOSS" });

                //4. Column Auto Fit
                spdData.RPT_AutoFit(false);
            }
            catch (Exception ex)
            {
                LoadingPopUp.LoadingPopUpHidden();
                CmnFunction.ShowMsgBox(ex.Message);
            }
            finally
            {
                LoadingPopUp.LoadingPopUpHidden();
            }
        }
コード例 #17
0
        /// <summary 5. View>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnView_Click(object sender, EventArgs e)
        {
            DataTable dt = null;

            if (CheckField() == false)
            {
                return;
            }

            try
            {
                LoadingPopUp.LoadIngPopUpShow(this);
                this.Refresh();
                GridColumnInit();
                dt = CmnFunction.oComm.GetFuncDataTable("DYNAMIC", MakeSqlString());

                if (dt.Rows.Count == 0)
                {
                    dt.Dispose();
                    LoadingPopUp.LoadingPopUpHidden();
                    CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD010", GlobalVariable.gcLanguage));
                    return;
                }

                //그루핑 순서 1순위만 SubTotal을 사용하기 위해서 첫번째 값을 가져옴
                int sub = ((udcTableForm)(this.btnSort.BindingForm)).GetCheckedValue(1);

                //1.Griid 합계 표시
                int[] rowType = spdData.RPT_DataBindingWithSubTotal(dt, 0, sub + 1, 6, null, null, btnSort);
                //                  토탈 시작할 셀넘버, 시작 부터 서브토탈 몇개 쓸건지, 첫셀부터 몇번째 셀까지 TOTAL 적용안함

                //3. Total부분 셀머지
                spdData.RPT_FillDataSelectiveCells("Total", 0, 6, 0, 1, true, Align.Center, VerticalAlign.Center);

                //4. Column Auto Fit
                spdData.RPT_AutoFit(false);

                //2010-03-19-임종우 : 영역별 SubTotal, GrandTotal 구하기
                SetTotalValue();
            }
            catch (Exception ex)
            {
                LoadingPopUp.LoadingPopUpHidden();
                CmnFunction.ShowMsgBox(ex.Message);
            }
            finally
            {
                LoadingPopUp.LoadingPopUpHidden();
            }
        }
コード例 #18
0
        private void btnCreate_Click(object sender, EventArgs e)
        {
            if (View_EQErr(true) == false)
            {
                CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD012", GlobalVariable.gcLanguage));
                return;
            }

            if (Update_EQErr_Data("INSERT") == true)
            {
                CmnFunction.ShowMsgBox(RptMessages.GetMessage("INF001", GlobalVariable.gcLanguage));
                View_EQErr_List();
            }
        }
コード例 #19
0
ファイル: PRD010208.cs プロジェクト: trantan490/web
        private void btnView_Click(object sender, EventArgs e)
        {
            DataTable dt = null;

            if (CheckField() == true)
            {
                GridColumnInit();
                spdData_Sheet1.RowCount = 0;
            }

            if (cdvFactory.Text.Equals("HMKE1") || cdvFactory.Text.Equals(GlobalVariable.gsTestDefaultFactory) || cdvFactory.Text.Equals("FGS"))
            {
                CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD052", GlobalVariable.gcLanguage));
                return;
            }

            try
            {
                LoadingPopUp.LoadIngPopUpShow(this);

                this.Refresh();

                dt = CmnFunction.oComm.GetFuncDataTable("DYNAMIC", MakeSqlString()); //데이터 저장

                if (dt.Rows.Count == 0)
                {
                    dt.Dispose();
                    LoadingPopUp.LoadingPopUpHidden();
                    CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD010", GlobalVariable.gcLanguage));
                    return;
                }



                //1.Griid 합계 표시
                int[] rowType = spdData.RPT_DataBindingWithSubTotal(dt, 0, 0, 1, null, null, btnSort);

                //2. Total부분 셀머지
                spdData.RPT_FillDataSelectiveCells("Total", 0, 11, 0, 1, true, Align.Center, VerticalAlign.Center);
            }
            catch (Exception ex)
            {
                LoadingPopUp.LoadingPopUpHidden();
                CmnFunction.ShowMsgBox(ex.Message);
            }
            finally
            {
                LoadingPopUp.LoadingPopUpHidden();
            }
        }
コード例 #20
0
        /// <summary>
        /// 조회
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnView_Click(object sender, EventArgs e)
        {
            if (!CheckField())
            {
                return;
            }


            DataTable dt = null;

            GridColumnInit();

            try
            {
                LoadingPopUp.LoadIngPopUpShow(this);
                spdData_Sheet1.RowCount = 0;

                this.Refresh();
                dt = CmnFunction.oComm.GetFuncDataTable("DYNAMIC", MakeSqlString());

                if (dt.Rows.Count == 0)
                {
                    dt.Dispose();
                    LoadingPopUp.LoadingPopUpHidden();
                    CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD010", GlobalVariable.gcLanguage));
                    return;
                }
                spdData.DataSource = dt;

                spdData.RPT_AutoFit(false);

                //1. column header
                for (int i = 0; i <= 4; i++)
                {
                    spdData.ActiveSheet.Columns[i].BackColor = Color.LemonChiffon;
                }

                dt.Dispose();
            }
            catch (Exception ex)
            {
                LoadingPopUp.LoadingPopUpHidden();
                CmnFunction.ShowMsgBox(ex.Message);
            }
            finally
            {
                LoadingPopUp.LoadingPopUpHidden();
            }
        }
コード例 #21
0
ファイル: PQC030201.cs プロジェクト: trantan490/web
        /// <summary 1. 유효성 검사>
        /// <remarks></remarks>
        /// </summary>
        /// <returns></returns>
        private Boolean CheckField()
        {
            if (cdvChartID.Text == "ALL")
            {
                CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD042", GlobalVariable.gcLanguage));
                return(false);
            }

            if (cdvCharID.Text == "ALL")
            {
                CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD043", GlobalVariable.gcLanguage));
                return(false);
            }
            return(true);
        }
コード例 #22
0
ファイル: udcChartFX.cs プロジェクト: trantan490/web
        // 시리즈 Legend를 셋팅
        public void RPT_8_SetSeriseLegend(string [] SeriseTitle, SoftwareFX.ChartFX.Docked dock)
        {
            if (SerCount < SeriseTitle.Length)
            {
                throw new Exception(RptMessages.GetMessage("STD085", GlobalVariable.gcLanguage) + SerCount.ToString());
            }

            this.SerLegBox           = true;
            this.SerLegBoxObj.Docked = dock;

            for (int i = 0; i < SeriseTitle.Length; i++)
            {
                this.SerLeg[i] = SeriseTitle [i];
            }
        }
コード例 #23
0
        private void cdvMat_ButtonPress(object sender, EventArgs e)
        {
            if (cdvFactory.Text.TrimEnd() == "")
            {
                MessageBox.Show(RptMessages.GetMessage("STD001", GlobalVariable.gcLanguage), "STD1208");
                return;
            }
            cdvMat.Init();
            CmnInitFunction.InitListView(cdvMat.GetListView);
            cdvMat.Columns.Add("KEY_1", 30, HorizontalAlignment.Left);
            cdvMat.Columns.Add("DATA_1", 70, HorizontalAlignment.Left);
            cdvMat.SelectedSubItemIndex = 0;

            RptListFunction.ViewMatList(cdvMat.GetListView, cdvFactory.Text, "");
        }
コード例 #24
0
ファイル: udcChartFX.cs プロジェクト: trantan490/web
        public void RPT_8_SetSeriseLegend(FpSpread spread, int Rows, int [] Columns, SoftwareFX.ChartFX.Docked dock)
        {
            if (SerCount < Columns.Length)
            {
                throw new Exception(RptMessages.GetMessage("STD085", GlobalVariable.gcLanguage) + SerCount.ToString());
            }

            this.SerLegBox           = true;
            this.SerLegBoxObj.Docked = dock;

            for (int i = 0; i < Columns.Length; i++)
            {
                this.SerLeg[i] = spread.ActiveSheet.Cells [Rows, Columns [i]].Text;
            }
        }
コード例 #25
0
ファイル: TRN090401.cs プロジェクト: trantan490/web
        private void btnView_Click(object sender, EventArgs e)
        {
            DataTable dt = null;

            if (CheckField() == false)
            {
                return;
            }

            GridColumnInit();

            try
            {
                LoadingPopUp.LoadIngPopUpShow(this);

                this.Refresh();
                dt = CmnFunction.oComm.GetFuncDataTable("DYNAMIC", MakeSqlString());

                if (dt.Rows.Count == 0)
                {
                    dt.Dispose();
                    LoadingPopUp.LoadingPopUpHidden();
                    CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD010", GlobalVariable.gcLanguage));
                    return;
                }

                spdData.DataSource = dt;

                // 첫 컬럼 색상 지정
                spdData.ActiveSheet.Columns[0].BackColor = Color.YellowGreen;

                if (spdData.ActiveSheet.RowCount > 0)
                {
                    ShowChart(0);
                }

                dt.Dispose();
            }
            catch (Exception ex)
            {
                LoadingPopUp.LoadingPopUpHidden();
                CmnFunction.ShowMsgBox(ex.Message);
            }
            finally
            {
                LoadingPopUp.LoadingPopUpHidden();
            }
        }
コード例 #26
0
        /// <summary>
        /// 조회
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnView_Click(object sender, EventArgs e)
        {
            if (!CheckField())
            {
                return;
            }

            DataTable dt = null;

            GridColumnInit();

            try
            {
                LoadingPopUp.LoadIngPopUpShow(this);
                spdData_Sheet1.RowCount = 0;
                this.Refresh();
                dt = CmnFunction.oComm.GetFuncDataTable("DYNAMIC", MakeSqlString());

                if (dt.Rows.Count == 0)
                {
                    dt.Dispose();
                    LoadingPopUp.LoadingPopUpHidden();
                    CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD010", GlobalVariable.gcLanguage));
                    return;
                }

                spdData.DataSource = dt;

                spdData.isShowZero = true;

                spdData.RPT_AutoFit(false);

                //Chart 생성
                if (spdData.ActiveSheet.RowCount > 0)
                {
                    ChartShow(0);
                }
            }
            catch (Exception ex)
            {
                LoadingPopUp.LoadingPopUpHidden();
                CmnFunction.ShowMsgBox(ex.Message);
            }
            finally
            {
                LoadingPopUp.LoadingPopUpHidden();
            }
        }
コード例 #27
0
ファイル: PQC030201.cs プロジェクト: trantan490/web
        //private void Chart_Xbar_SetData(DataTable a_dt, int iValue1)
        //{
        //    //Series series = null;
        //    chart1.Series.Clear();


        //    int iValue25 = iValue1 + 25;  // Value_25까지 있기 때문에,,

        //    DataTable dt = new DataTable();   // 새로운 DataTable dt를 만들어서
        //    dt = a_dt;                                       // dt에다가 받아온 a_dt 를 넣어준다.
        //    dt.Columns.Add("AVG", typeof(String));         // 각 ROW별로 VALUE_1~25까지 컬럼값의 평균을 넣어줄것이다.

        //    //1. 평균 구하기(Xbar)
        //    for (int i = 0; i < dt.Rows.Count; i++)
        //    {
        //        spc.clear();

        //        for (int j = iValue1; j < iValue25; j++)
        //        {
        //            if (dt.Rows[i][j].Equals(" ") || dt.Rows[i][j].Equals(""))        // 값이 없으면 그 뒤로도 없기 때문에
        //            {
        //                break;
        //            }
        //            else
        //            {
        //                double x = Convert.ToDouble(dt.Rows[i][j]);     // x에 컬럼값들 대입한다음에
        //                spc.Add(x);           //spc.Add에 x값을 넣어주면 spc.clear() 호출하지 않는 이상 계속 축적되어 더해지고(sum), 자기네들끼리 비교해서 min,max값 구해놓고 있다,.
        //            }
        //        }
        //        dt.Rows[i]["AVG"] = spc.mean();    // 각 row별 (value1~25까지의) 평균을 넣어준다.
        //    }

        //    // 2. 표준편차 구하기 : 표준편차는 모든 값들에(dt에 있는)   대한 표준편차를 구한다,(여동욱k께 문의한 결과)
        //    spc.clear();
        //    for (int i = 0; i < dt.Rows.Count; i++)
        //    {
        //        for (int j = iValue1; j < iValue25; j++)
        //        {
        //            if (dt.Rows[i][j].Equals(" ") || dt.Rows[i][j].Equals(""))
        //            {
        //                break;
        //            }
        //            else
        //            {
        //                double x = Convert.ToDouble(dt.Rows[i][j]);
        //                spc.Add(x);
        //            }
        //        }
        //    }
        //    dSt = spc.stdev();   // 표준편차 구해서(spc.stdev()) dSt 에 넣어준다.


        //    //3. 새로운 DataTabe(dtX)를 생성해준다.
        //    dtX = new DataTable();

        //    if (dtX.Columns.Count == 0) // X-bar용
        //    {
        //        // 새로운 Datatable에 넣을 column도 정의하고
        //        DataColumn dc = new DataColumn();
        //        dc.DataType = System.Type.GetType("System.String");
        //        dc.ColumnName = "LOT_ID";
        //        dc.Caption = "LOT_ID";
        //        dc.DefaultValue = "";
        //        dtX.Columns.Add(dc);

        //        DataColumn dd = new DataColumn();
        //        dd.DataType = System.Type.GetType("System.Double");
        //        dd.ColumnName = "AVG";
        //        dd.Caption = "AVG";
        //        dd.DefaultValue = 0.00;
        //        dtX.Columns.Add(dd);
        //    }


        //    // 4. 1번에서 구한 각Row들의 평균을 날짜별로 Group By 해서 각각 총 평균을 구해서 DATE, AVG 컬럼만 뽑아서
        //    //     새로운 DataTable(dtX)를 생성해서 넣어준다.

        //    // TranTime 기준을 Lot ID 기준으로 변경 - Xbar Chart 기준 변경..여동욱K요청(2009.09.28 임종우)
        //    spc.clear();    // 수학관련해서 모두 초기화하고
        //    string sLot = " ";
        //    int k = 0;

        //    for (int i = 0; i < dt.Rows.Count; i++)
        //    {
        //        if (!sLot.Equals(dt.Rows[i][0]))
        //        {
        //            if (i == 0) // 만약 맨 첫줄이라면
        //            {
        //                //dtX.Rows.Add();           // 아무일도 안한다.
        //            }
        //            else if (i != 0)
        //            {
        //                dtX.Rows.Add();                         // row한줄 추가하고
        //                dtX.Rows[k]["LOT_ID"] = sLot;        //  바로 전의 값들을  새로운 DataTable dtX에 넣어준다. Lot ID넣어주고
        //                dtX.Rows[k]["AVG"] = spc.mean();         // 평균넣어주고
        //                spc.clear();                           // 수학관련해서 초기화해주고: 왜냐하면 다음 번 값들을 새로 받아야 하니깐
        //                k++;
        //            }
        //            sLot = Convert.ToString(dt.Rows[i][0]);                 // sLot 에 해당 컬럼값(LOT ID) 대입하고
        //            double x = Convert.ToDouble(dt.Rows[i]["AVG"]);
        //            spc.Add(x);
        //        }
        //        else
        //        {
        //            if (i == dt.Rows.Count - 1)
        //            {
        //                dtX.Rows.Add();
        //                dtX.Rows[k]["LOT_ID"] = sLot;
        //                dtX.Rows[k]["AVG"] = spc.mean();
        //            }
        //            else
        //            {
        //                double x = Convert.ToDouble(dt.Rows[i]["AVG"]);
        //                spc.Add(x);
        //            }
        //        }
        //    }

        //    // Chart에 뿌려주기 위해서 모든 AVG값들의 평균을 구하고 2번에서 구한 표준편차를 이용해서 Chart에 넘겨줄 UCL, LCL, USL, LSL을 구한다.

        //    if (dtX.Rows.Count != 0)
        //    {
        //        spc.clear();
        //        dAvg = 0.0;

        //        for (int i = 0; i < dtX.Rows.Count; i++)
        //        {
        //            double x = Convert.ToDouble(dtX.Rows[i]["AVG"]);
        //            spc.Add(x);
        //        }
        //        dAvg = Math.Round(spc.mean(), 2);

        //        dUcl = Math.Round(dAvg + (3 * dSt), 2);
        //        dLcl = Math.Round(dAvg - (3 * dSt), 2);
        //        dUsl = Math.Round(dAvg + (4 * dSt), 2);
        //        dLsl = Math.Round(dAvg - (4 * dSt), 2);


        //        // Chart 그리고
        //        //RPT_3_1_SetData(dtX, "X-bar Chart");

        //        //DataTable dtNew = new DataTable();   // 새로운 DataTable dt를 만들어서
        //        //dtNew = dtX;                         // dt에다가 받아온 a_dt 를 넣어준다.

        //        // MS 차트 데이터 바인딩 로직 넣어야함...
        //        //this.DataSource = dtNew;
        //        //this.AxisX.Title.Text = sTitle;

        //        DataTable dtNew = new DataTable();
        //        dtNew = dtX;

        //        series = new Series();
        //        series.ChartType = SeriesChartType.Line;
        //        series.IsValueShownAsLabel = true;
        //        series.IsVisibleInLegend = false;

        //        chart1.Series.Add(series);

        //        for (int i = 0; i < dtNew.Rows.Count; i++)
        //        {
        //            chart1.Series[0].Points.AddXY(dtNew.Rows[i][0].ToString(), Convert.ToDouble(dtNew.Rows[i][1]));
        //        }

        //        //chart1.Series[0].YAxisType = AxisType.Secondary;

        //        chart1.Series[0].Color = Color.Black;
        //        chart1.Series[0].MarkerStyle = MarkerStyle.Circle;
        //        chart1.Series[0].MarkerSize = 10;
        //        chart1.Series[0].BorderWidth = 3;

        //        //chart1.ChartAreas[0].CursorX.AutoScroll = true;
        //        chart1.ChartAreas[0].CursorX.IsUserEnabled = true;
        //        chart1.ChartAreas[0].CursorX.IsUserSelectionEnabled = true;

        //        //chart1.ChartAreas[0].AxisX.ScaleView.Zoomable = true;
        //        //chart1.ChartAreas[0].AxisX.ScaleView.SizeType = DateTimeIntervalType.Number;

        //        chart1.ChartAreas[0].AxisX.ScrollBar.Size = 10;
        //        chart1.ChartAreas[0].AxisX.ScrollBar.IsPositionedInside = true;

        //        chart1.ChartAreas[0].AxisX.MajorGrid.LineWidth = 0;
        //        chart1.ChartAreas[0].AxisY.MajorGrid.LineWidth = 1;
        //        chart1.ChartAreas[0].AxisY2.MajorGrid.LineWidth = 1;

        //        chart1.ChartAreas[0].AxisY.Maximum = dUsl;
        //        chart1.ChartAreas[0].AxisY.Minimum = dLsl;

        //        chart1.ChartAreas[0].AxisY2.Enabled = AxisEnabled.True;
        //        chart1.ChartAreas[0].AxisY2.Minimum = 0;
        //        chart1.ChartAreas[0].AxisY2.Maximum = 8;

        //        chart1.ChartAreas[0].AxisY2.CustomLabels.Add(dLcl, dLcl, "LCL=" + "\n" + dLcl);
        //        //this.AxisY2.Label[1] = "LCL=" + "\n" + dLcl;


        //        /*
        //        StripLine stripLow = new StripLine();
        //        stripLow.IntervalOffset = 1;
        //        stripLow.StripWidth = 6;
        //        stripLow.BackColor = Color.Red;

        //        StripLine stripMed = new StripLine();
        //        stripMed.IntervalOffset = 2;
        //        stripMed.StripWidth = 4;
        //        stripMed.BackColor = Color.Yellow;

        //        StripLine stripHigh = new StripLine();
        //        stripHigh.IntervalOffset = 3;
        //        stripHigh.StripWidth = 2;
        //        stripHigh.BackColor = Color.Chartreuse;

        //        StripLine stripCL = new StripLine();
        //        stripCL.IntervalOffset = 4;
        //        stripCL.StripWidth = 0;
        //        stripCL.BorderColor = Color.DimGray;
        //        stripCL.BorderWidth = 1;

        //        chart1.ChartAreas[0].AxisY2.StripLines.Add(stripLow);
        //        chart1.ChartAreas[0].AxisY2.StripLines.Add(stripMed);
        //        chart1.ChartAreas[0].AxisY2.StripLines.Add(stripHigh);
        //        chart1.ChartAreas[0].AxisY2.StripLines.Add(stripCL);
        //        */

        //        //chart1.ChartAreas[0].AxisY2.CustomLabels.Add(0, 1, "LCL=" + "\n" + dLcl);


        //        //RPT_3_2_SetColor(dLcl, dAvg, dUcl, dUsl, dLsl);    // 색깔 칠해주고
        //        /*
        //        // Y2 좌표를 총 8등분해서 나타낸다(나중에 색깔 칠하고 값넣기 편하게)
        //        this.AxisY2.Min = 0;
        //        this.AxisY2.Max = 8;
        //        this.AxisY2.Step = 1;

        //        //////// 색깔칠하기
        //        this.Series[0].Color = System.Drawing.Color.Black;

        //        SoftwareFX.ChartFX.AxisSection section1 = this.AxisY2.Sections[0];
        //        section1.From = 1;
        //        section1.To = 7;
        //        section1.BackColor = System.Drawing.Color.Red;

        //        SoftwareFX.ChartFX.AxisSection section2 = this.AxisY2.Sections[1];
        //        section2.From = 2;
        //        section2.To = 6;
        //        section2.BackColor = System.Drawing.Color.Yellow;

        //        SoftwareFX.ChartFX.AxisSection section3 = this.AxisY2.Sections[2];
        //        section3.From = 3;
        //        section3.To = 5;
        //        section3.BackColor = System.Drawing.Color.Chartreuse;

        //        // LCL, CL, UCL 값에 가져온 값들과 함께 하기와 같이 표기한다.
        //        this.AxisY2.Label[1] = "LCL=" + "\n" + dLcl;
        //        this.AxisY2.Label[4] = "CL=" + "\n" + dCl;
        //        this.AxisY2.Label[7] = "UCL=" + "\n" + dUcl;

        //        //////CL가운데 선긋기 : 평균값을 보여주기 위해서,,,근데 0일때,,,,,,,,도 같이 줄이 보이니,,,,,,,,문제점 발견<<<해결요망//////
        //        SoftwareFX.ChartFX.ConstantLine constantLine = this.ConstantLines[0];
        //        constantLine.Value = 4;
        //        constantLine.Color = System.Drawing.Color.DimGray;
        //        constantLine.Axis = SoftwareFX.ChartFX.AxisItem.Y2;

        //        // Y축의 min과 max값도 정해주고 보여줄 필요 없기 때문에 visible=false 했음
        //        this.AxisY.Max = dUsl;
        //        this.AxisY.Min = dLsl;
        //        this.AxisY.Visible = false;
        //        */
        //    }
        //}

        /*
         * private void Chart_R_SetData(DataTable a_dt, int iValue1)
         * {
         *  chart2.Series.Clear();
         *
         *
         *  int iValue25 = iValue1 + 25;
         *
         *  DataTable dt = new DataTable();   // 새로운 DataTable dt를 만들어서
         *  dt = a_dt;                                       // dt에다가 받아온 a_dt 를 넣어준다.
         *  dt.Columns.Add("MIN", typeof(String));
         *  dt.Columns.Add("MAX", typeof(String));
         *
         *
         *  //1. 각 Row 별로 MIN, MAX 값 구하기
         *  for (int i = 0; i < dt.Rows.Count; i++)
         *  {
         *      spc.clear();
         *
         *      for (int j = iValue1; j < iValue25; j++)
         *      {
         *          if (dt.Rows[i][j].Equals(" ") || dt.Rows[i][j].Equals(""))
         *          {
         *              break;
         *          }
         *          else
         *          {
         *              double x = Convert.ToDouble(dt.Rows[i][j]);
         *              spc.Add(x);
         *          }
         *
         *      }
         *      dt.Rows[i]["MIN"] = spc.min();
         *      dt.Rows[i]["MAX"] = spc.max();
         *  }
         *
         *
         *  //2. 새로운 DataTabe(dtR)를 생성해준다.
         *  dtR = new DataTable();
         *
         *  if (dtR.Columns.Count == 0) // R-bar용
         *  {
         *      // 새로운 Datatable에 넣을 column도 정의하고
         *      DataColumn dc = new DataColumn();
         *      dc.DataType = System.Type.GetType("System.String");
         *      dc.ColumnName = "LOT_ID";
         *      dc.Caption = "LOT_ID";
         *      dc.DefaultValue = "";
         *      dtR.Columns.Add(dc);
         *
         *      DataColumn dd = new DataColumn();
         *      dd.DataType = System.Type.GetType("System.Double");
         *      dd.ColumnName = "R";
         *      dd.Caption = "R";
         *      dd.DefaultValue = 0.00;
         *      dtR.Columns.Add(dd);
         *  }
         *
         *  // 3. 1번에서 구한 각Row들의 MIN, MAX 값 가지고 LOT_ID로 Group By 해서 각각 총 평균을 구해서 LOT_ID, R값(MAX-MIN) 을
         *  //     새로운 DataTable(dtR)를 생성해서 넣어준다.
         *
         *  spc.clear();    // 수학관련해서 모두 초기화하고
         *  string sLot = " ";
         *  int k = 0;
         *
         *  for (int i = 0; i < dt.Rows.Count; i++)
         *  {
         *
         *      if (!sLot.Equals(dt.Rows[i][0]))
         *      {
         *          if (i == 0) // 만약 맨 첫줄이라면
         *          {
         *              //  dtR.Rows.Add();
         *              //   아무일도 안한다.
         *          }
         *          else if (i != 0)
         *          {
         *              dtR.Rows.Add();
         *              dtR.Rows[k]["LOT_ID"] = sLot;       //   바로 전의 값들을  새로운 DataTable dtR에 넣어준다. LOT_ID넣어주ㅗㄱ
         *              dtR.Rows[k]["R"] = spc.gap();       //   max-min값넣어주고
         *              spc.clear();                          //  수학관련해서 초기화해주고: 왜냐하면 다음 번 값들을 새로 받아야 하니깐
         *              k++;
         *          }
         *          sLot = Convert.ToString(dt.Rows[i][0]);               //   sLot 에 해당 컬럼값(LOT_ID) 대입하고
         *
         *
         *
         *          for (int s = dt.Columns.IndexOf("MIN") - 1; s < dt.Columns.IndexOf("MIN") + 1; s++)
         *          {
         *              double x = Convert.ToDouble(dt.Rows[i][s]);
         *              spc.Add(x);                                                         //        x값들이 모아져서 sum......
         *          }
         *      }
         *      else
         *      {
         *          if (i == dt.Rows.Count - 1)
         *          {
         *              dtR.Rows.Add();
         *              dtR.Rows[k]["LOT_ID"] = sLot;
         *              dtR.Rows[k]["R"] = spc.gap();
         *          }
         *          else
         *          {
         *              for (int s = dt.Columns.IndexOf("MIN") - 1; s < dt.Columns.IndexOf("MIN") + 1; s++)
         *              {
         *                  double x = Convert.ToDouble(dt.Rows[i][s]);
         *                  spc.Add(x);                                                           //      x값들이 모아져서 sum......
         *              }
         *          }
         *      }
         *
         *  }
         *
         *  //RPT_3_1_SetData(dtR, "R Chart");
         *
         *  DataTable dtNew = new DataTable();
         *  dtNew = dtR;
         *
         *  series = new Series();
         *  series.ChartType = SeriesChartType.Line;
         *  series.IsValueShownAsLabel = true;
         *  series.IsVisibleInLegend = false;
         *
         *  chart2.Series.Add(series);
         *
         *  for (int i = 0; i < dtNew.Rows.Count; i++)
         *  {
         *      chart2.Series[0].Points.AddXY(dtNew.Rows[i][0].ToString(), Convert.ToDouble(dtNew.Rows[i][1]));
         *  }
         *
         *  chart2.Series[0].MarkerStyle = MarkerStyle.Circle;
         *  chart2.Series[0].MarkerSize = 10;
         *  chart2.Series[0].BorderWidth = 3;
         *
         *  chart2.ChartAreas[0].CursorX.IsUserEnabled = true;
         *  chart2.ChartAreas[0].CursorX.IsUserSelectionEnabled = true;
         *  chart2.ChartAreas[0].AxisX.ScrollBar.Size = 10;
         *  chart2.ChartAreas[0].AxisX.ScrollBar.IsPositionedInside = true;
         *
         *
         *  chart2.ChartAreas[0].AxisX.MajorGrid.LineWidth = 0;
         *
         *  chart2.ChartAreas[0].AxisY.Minimum = 0;
         *  chart2.ChartAreas[0].AxisY.IsInterlaced = true;
         *  chart2.ChartAreas[0].AxisY.InterlacedColor = Color.FromArgb(80, Color.DarkGray);
         *
         *  //this.AxisY.Min = 0;              // R Chart는 무조건 Y축 최소값이 0
         *  //this.AxisY.Gridlines = true;
         * }*/

        #endregion


        #region " Button Event "
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>


        private void btnView_Click(object sender, EventArgs e)
        {
            if (CheckField() == false)
            {
                return;
            }
            LoadingPopUp.LoadIngPopUpShow(this);
            //dt = null;
            dtview = null;

            try
            {
                this.Refresh();
                //LoadingPopUp.LoadIngPopUpShow(this);

                GridColumnInit();

                dtview = CmnFunction.oComm.GetFuncDataTable("DYNAMIC", MakeSqlString());
                //dt = CmnFunction.oComm.GetFuncDataTable("DYNAMIC", MakeSqlString());

                if (dtview.Rows.Count == 0) //dt.Rows.Count == 0
                {
                    dtview.Dispose();       //dt.Dispose();
                    LoadingPopUp.LoadingPopUpHidden();
                    //udcChartFXSpc1.RPT_1_ChartInit();
                    //udcChartFXSpc1.RPT_2_ClearData();
                    CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD010", GlobalVariable.gcLanguage));
                    return;
                }
                //// 값을 뿌려주기 위해서 새로운 Chart를 불러낸다
                ShowChart();

                dtview = CmnFunction.oComm.GetFuncDataTable("DYNAMIC", MakeSqlString2());
                //dt = CmnFunction.oComm.GetFuncDataTable("DYNAMIC", MakeSqlString2());

                spdData.DataSource = dtview;
                //spdData.DataSource = dt;
            }
            catch (Exception ex)
            {
                LoadingPopUp.LoadingPopUpHidden();
                CmnFunction.ShowMsgBox(ex.Message);
            }
            finally
            {
                LoadingPopUp.LoadingPopUpHidden();
            }
        }
コード例 #28
0
ファイル: TRN090401.cs プロジェクト: trantan490/web
        private Boolean CheckField()
        {
            if (cdvCustom.Text.Trim() == "")
            {
                CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD033", GlobalVariable.gcLanguage));
                return(false);
            }

            if (cdvPkg.Text.Trim() == "")
            {
                CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD081", GlobalVariable.gcLanguage));
                return(false);
            }

            return(true);
        }
コード例 #29
0
        private Boolean CheckField()
        {
            Boolean Check = false;

            if (cdvFactory.Text.TrimEnd() == "")
            {
                MessageBox.Show(RptMessages.GetMessage("STD001", GlobalVariable.gcLanguage), "STD1501");
                Check = false;
            }
            else
            {
                Check = true;
            }

            return(Check);
        }
コード例 #30
0
ファイル: CUS060108.cs プロジェクト: trantan490/web
        /// <summary>
        /// 1. 유효성 검사
        /// </summary>
        /// <returns></returns>
        private Boolean CheckField()
        {
            if (cdvFactory.txtValue.Trim() == "")
            {
                CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD001", GlobalVariable.gcLanguage));
                return(false);
            }

            if (cdvCustomer.Text.Equals("") || cdvCustomer.Text.Equals("ALL"))
            {
                CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD038", GlobalVariable.gcLanguage));
                return(false);
            }

            return(true);
        }