コード例 #1
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtUserId.Text.Trim().Length == 0)
                {
                    CmnFunction.ShowMsgBox("User ID : " + RptMessages.GetMessage("STD999", GlobalVariable.gcLanguage));
                }
                if (txtPassword.Text.Trim().Length == 0)
                {
                    CmnFunction.ShowMsgBox("Password : "******"STD999", GlobalVariable.gcLanguage));
                }
                if (cdvSecGrpId.Text.Trim().Length == 0)
                {
                    CmnFunction.ShowMsgBox("Secutiry Group : " + RptMessages.GetMessage("STD999", GlobalVariable.gcLanguage));
                }
                if (CmnFunction.ShowMsgBox(RptMessages.GetMessage("INF003", GlobalVariable.gcLanguage), "Update", MessageBoxButtons.YesNo, 2) != System.Windows.Forms.DialogResult.Yes)
                {
                    return;
                }
                if (Update_Security_User(txtUserId.Text.Trim()) == true)
                {
                    CmnFunction.ShowMsgBox(RptMessages.GetMessage("INF001", GlobalVariable.gcLanguage));

                    CmnInitFunction.FieldClear(this, null, false);
                    CmnListFunction.ViewSecUserList(lisUser);
                }
            }
            catch (Exception ex)
            {
                CmnFunction.ShowMsgBox("SEC1101.btnUpdate_Click() : " + ex.ToString());
            }
        }
コード例 #2
0
ファイル: STD1905.cs プロジェクト: trantan490/web
        private Boolean CheckField()
        {
            Boolean Check = false;

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

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

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

            if (txtLotId.Text.TrimEnd() == "")
            {
                CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD009", GlobalVariable.gcLanguage));
                return(false);
            }

            if (cdvOper.Text.TrimEnd() == "")
            {
                CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD064", GlobalVariable.gcLanguage));
                return(false);
            }

            if (txtTime.Text.TrimEnd() == "")
            {
                CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD074", GlobalVariable.gcLanguage));
                return(false);
            }


            return(true);
        }
コード例 #4
0
        /// <summary 1. 유효성 검사>
        /// <remarks></remarks>
        /// </summary>
        /// <returns></returns>
        private Boolean CheckField()
        {
            if (cdvFactory.Text.TrimEnd() == "")
            {
                CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD001", GlobalVariable.gcLanguage));
                return(false);
            }

            if (cdvStep.Text.TrimEnd() == "")
            {
                CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD005", GlobalVariable.gcLanguage));
                return(false);
            }

            // 2011-05-30-임종우 : MRASRESDEF_BOH 테이블 2011년 5월 30일 11시에 생성 하여 11시 데이터 부터 Snapshot 시작 함.
            //string strDate = cdvDate.Value.ToString("yyyyMMdd") + cboTimeBase.Text.Replace("시", "");
            string strDate = cdvDate.Value.ToString("yyyyMMdd") + cboTimeBase.Text.Substring(0, 2);

            if (Convert.ToInt32(strDate) < 2011053011)
            {
                CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD058", GlobalVariable.gcLanguage));
                return(false);
            }

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

            if (cdvStep.Text.TrimEnd() == "" || cdvStep.Text.TrimEnd() == "ALL")
            {
                CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD005", GlobalVariable.gcLanguage));
                return(false);
            }

            if (cdvStep.SelectCount > 10)
            {
                CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD069", GlobalVariable.gcLanguage));
                return(false);
            }

            if (cdvFromToDate.SubtractBetweenFromToDate + 1 > 12)
            {
                CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD070", GlobalVariable.gcLanguage));
                return(false);
            }

            return(true);
        }
コード例 #6
0
        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(0));
                GridColumnInit();
                spdData_Sheet1.RowCount = 0;
                //    spdData_Sheet1.ColumnCount = 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;
                ShowChart();
            }
            catch (Exception ex)
            {
                LoadingPopUp.LoadingPopUpHidden();
                CmnFunction.ShowMsgBox(ex.Message);
            }
            finally
            {
                LoadingPopUp.LoadingPopUpHidden();
            }
        }
コード例 #7
0
        private void btnCreate_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtUserId.Text.Trim().Length == 0)
                {
                    CmnFunction.ShowMsgBox("User ID : " + RptMessages.GetMessage("STD999", GlobalVariable.gcLanguage));
                }
                if (txtPassword.Text.Trim().Length == 0)
                {
                    CmnFunction.ShowMsgBox("Password : "******"STD999", GlobalVariable.gcLanguage));
                }
                if (cdvSecGrpId.Text.Trim().Length == 0)
                {
                    CmnFunction.ShowMsgBox("Secutiry Group : " + RptMessages.GetMessage("STD999", GlobalVariable.gcLanguage));
                }
                if (Create_Security_User() == true)
                {
                    CmnFunction.ShowMsgBox(RptMessages.GetMessage("INF001", GlobalVariable.gcLanguage));

                    ListViewItem lstItem;
                    lstItem = lisUser.Items.Add(txtUserId.Text.Trim(), (int)SMALLICON_INDEX.IDX_USER);
                    lstItem.SubItems.Add(txtUserDesc.Text.Trim());
                    lstItem.Selected = true;
                    lisUser.Sorting  = SortOrder.Ascending;
                    lisUser.Sort();
                    lstItem.EnsureVisible();
                }
            }
            catch (Exception ex)
            {
                CmnFunction.ShowMsgBox("SEC1101.btnCreate_Click() : " + ex.ToString());
            }
        }
コード例 #8
0
ファイル: RAS020308.cs プロジェクト: trantan490/web
        private void btnView_Click(object sender, EventArgs e)
        {
            DataTable dt = null;

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

            GridColumnInit();
            udcChartFX1.RPT_1_ChartInit();

            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;
                }

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

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

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

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

                //spdData.RPT_FillColumnData(14, new string[] { "Yield", "In Qty", "Out Qty", "Loss" });

                // 누적점유율 수정
                spdData.ActiveSheet.Cells[0, 9, 0, 10].Value = 100.00;

                //ShowChart(0);
            }
            catch (Exception ex)
            {
                LoadingPopUp.LoadingPopUpHidden();
                CmnFunction.ShowMsgBox(ex.Message);
            }
            finally
            {
                LoadingPopUp.LoadingPopUpHidden();
            }
        }
コード例 #9
0
        private Boolean CheckField()
        {
            Boolean Check = false;

            if (cdvFactory.Text.TrimEnd() == "")
            {
                MessageBox.Show(RptMessages.GetMessage("STD001", GlobalVariable.gcLanguage), "STD1207");
                Check = false;
            }
            else if (cdvOper.Text.TrimEnd() == "")
            {
                MessageBox.Show(RptMessages.GetMessage("STD005", GlobalVariable.gcLanguage), "STD1207");
                Check = false;
            }
            else if (cdvMat.Text.TrimEnd() != "")
            {
                if (cdvMatVer.Text.TrimEnd() == "")
                {
                    MessageBox.Show(RptMessages.GetMessage("STD011", GlobalVariable.gcLanguage), "STD1207");
                    Check = false;
                }
                Check = true;
            }
            else
            {
                Check = true;
            }

            return(Check);
        }
コード例 #10
0
        private string GetCurrWeekInfo()
        {
            string    sMySql;
            DataTable dt = null;

            sMySql = "";
            sMySql = sMySql + " SELECT PLAN_WEEK V1 ";
            sMySql = sMySql + "   FROM MWIPCALDEF ";
            sMySql = sMySql + "  WHERE CALENDAR_ID IN ('SYSTEM', 'HM', '" + GlobalVariable.gsFactory + "') ";
            sMySql = sMySql + "    AND SYS_DATE = TO_CHAR(SYSDATE,'yyyymmdd')  ";
            sMySql = sMySql + "    AND ROWNUM = 1  ";

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

            if (dt.Rows.Count == 0)
            {
                dt.Dispose();
                CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD010", GlobalVariable.gcLanguage) + "- Week Code");
                return("");
            }
            else
            {
                return(dt.Rows[0]["V1"].ToString());
            }
        }
コード例 #11
0
        private void btnView_Click(object sender, EventArgs e)
        {
            if (cdvFactory.Text.Trim() == "")
            {
                CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD999", GlobalVariable.gcLanguage));
                cdvFactory.Focus();
                return;
            }

            if (cdvInqGrp.Text.Trim() == "")
            {
                CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD999", GlobalVariable.gcLanguage));
                cdvInqGrp.Focus();
                return;
            }

            if (cdvInqName.Text.Trim() == "")
            {
                CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD999", GlobalVariable.gcLanguage));
                cdvInqName.Focus();
                return;
            }


            View_Inquiry();
        }
コード例 #12
0
        /// <summary>
        /// 조회
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnView_Click(object sender, EventArgs e)
        {
            if (!CheckField())
            {
                return;
            }

            StringBuilder lotSqlString = new StringBuilder();

            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;
                }

                LabelTextChange();

                spdData.DataSource = dt;

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

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

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

                ////3. Total부분 셀머지
                //spdData.RPT_FillDataSelectiveCells("Total", 0, 10, 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();
            }
        }
コード例 #13
0
        /// <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);

            //저장
            Cursor.Current = Cursors.WaitCursor;
            try
            {
                spdData.ExportExcel();
            }
            catch (Exception ex)
            {
                CmnFunction.ShowMsgBox(ex.Message);
            }
            finally
            {
                Cursor.Current = Cursors.Default;
            }
        }
コード例 #14
0
ファイル: SEC1102.cs プロジェクト: trantan490/web
        private void btnCopy_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtSecGrp.Text.Trim().Length == 0)
                {
                    CmnFunction.ShowMsgBox("Security Group : " + RptMessages.GetMessage("STD999", GlobalVariable.gcLanguage));
                }
                if (txtToSecGrp.Text.Trim().Length == 0)
                {
                    CmnFunction.ShowMsgBox("Security Group : " + RptMessages.GetMessage("STD999", GlobalVariable.gcLanguage));
                }
                if (CmnFunction.ShowMsgBox(RptMessages.GetMessage("INF003", GlobalVariable.gcLanguage), "Copy", MessageBoxButtons.YesNo, 2) != System.Windows.Forms.DialogResult.Yes)
                {
                    return;
                }
                if (Copy_Security_Group(txtToSecGrp.Text.Trim()) == true)
                {
                    CmnFunction.ShowMsgBox(RptMessages.GetMessage("INF001", GlobalVariable.gcLanguage));

                    ListViewItem lstItem;
                    lstItem = lisSecGrp.Items.Add(txtToSecGrp.Text.Trim(), (int)SMALLICON_INDEX.IDX_SEC_GROUP);
                    lstItem.SubItems.Add("Copy From " + txtSecGrp.Text.Trim());
                    lstItem.Selected  = true;
                    lisSecGrp.Sorting = SortOrder.Ascending;
                    lisSecGrp.Sort();
                    lstItem.EnsureVisible();
                }
            }
            catch (Exception ex)
            {
                CmnFunction.ShowMsgBox("SEC1102.btnCopy_Click() : " + ex.ToString());
            }
        }
コード例 #15
0
ファイル: SEC1102.cs プロジェクト: trantan490/web
        private void btnDelete_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtSecGrp.Text.Trim().Length == 0)
                {
                    CmnFunction.ShowMsgBox("Security Group : " + RptMessages.GetMessage("STD999", GlobalVariable.gcLanguage));
                }
                if (CmnFunction.ShowMsgBox(RptMessages.GetMessage("INF002", GlobalVariable.gcLanguage), "Delete", MessageBoxButtons.YesNo, 2) != System.Windows.Forms.DialogResult.Yes)
                {
                    return;
                }
                if (Delete_Security_Group(txtSecGrp.Text.Trim()) == true)
                {
                    CmnFunction.ShowMsgBox(RptMessages.GetMessage("INF001", GlobalVariable.gcLanguage));

                    CmnInitFunction.FieldClear(this, null, false);
                    lisSecGrp.Items.Remove(lisSecGrp.SelectedItems[0]);
                }
            }
            catch (Exception ex)
            {
                CmnFunction.ShowMsgBox("SEC1102.btnDelete_Click() : " + ex.ToString());
            }
        }
コード例 #16
0
ファイル: TRN090101.cs プロジェクト: trantan490/web
        /// <summary>
        /// 6. View 버튼 Action
        /// </summary>        ///
        private void btnView_Click(object sender, EventArgs e)
        {
            DataTable dt = null;

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

            GridColumnInit();
            LabelTextChange();

            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;
                }

                int[] rowType = spdData.RPT_DataBindingWithSubTotal(dt, 0, 0, 1, null, null, btnSort);
                //Total부분 셀머지
                spdData.RPT_FillDataSelectiveCells("goal", 0, 1, 0, 1, true, Align.Center, VerticalAlign.Center);

                // 목표
                spdData.ActiveSheet.Cells[0, 1].Value = 100;
                spdData.ActiveSheet.Cells[0, 2].Value = 100;
                spdData.ActiveSheet.Cells[0, 3].Value = 100;
                spdData.ActiveSheet.Cells[0, 4].Value = 100;
                spdData.ActiveSheet.Cells[0, 5].Value = 100;
                spdData.ActiveSheet.Cells[0, 6].Value = 100;
                spdData.ActiveSheet.Cells[0, 7].Value = 100;
                spdData.ActiveSheet.Cells[0, 8].Value = 100;

                dt.Dispose();

                //Chart 생성
                if (spdData.ActiveSheet.RowCount > 0)
                {
                    fnMakeChart(spdData, spdData.ActiveSheet.RowCount);
                }
            }
            catch (Exception ex)
            {
                LoadingPopUp.LoadingPopUpHidden();
                CmnFunction.ShowMsgBox(ex.Message);
            }
            finally
            {
                LoadingPopUp.LoadingPopUpHidden();
            }
        }
コード例 #17
0
        private void udcMSChart_PrePaint(object sender, ChartPaintEventArgs e)
        {
            System.Windows.Forms.DataVisualization.Charting.Chart iChart = new System.Windows.Forms.DataVisualization.Charting.Chart();
            iChart = (System.Windows.Forms.DataVisualization.Charting.Chart)sender;

            try
            {
                for (int p = 0; p < iChart.Series.Count; p++)
                {
                    //for (int s = 0; s < iChart.Series[p].Points.Count; s++)
                    foreach (DataPoint point in iChart.Series[p].Points.FindAllByValue(0))
                    {
                        point.Label = " ";
                    }
                }

                //foreach (DataPoint dp in chart1.Series["Series1"].Points.FindAllByValue(0))
                //{
                //    dp.Label = " ";
                //}
            }
            catch (Exception ex)
            {
                throw new Exception(RptMessages.GetMessage("STD097", GlobalVariable.gcLanguage) + ex.Message);
                //LoadingPopUp.LoadingPopUpHidden();
                //CmnFunction.ShowMsgBox(ex.Message);
            }
        }
コード例 #18
0
ファイル: CUS060106.cs プロジェクト: trantan490/web
        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);

                if (cdvFactory.Text.Equals(GlobalVariable.gsAssyDefaultFactory))
                {
                    dt = CmnFunction.oComm.GetFuncDataTable("DYNAMIC", MakeSqlString());
                }
                else if (cdvFactory.Text.Equals(GlobalVariable.gsTestDefaultFactory))
                {
                    dt = CmnFunction.oComm.GetFuncDataTable("DYNAMIC", MakeSqlStringTest());
                }


                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();
            }
        }
コード例 #19
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
            {
                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;
                }

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

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

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

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

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

                // yield TOTAL부분 직접계산
                for (int i = 0; i < cdvFromTo.SubtractBetweenFromToDate + 1; i++)
                {
                    SetAvgVertical(1, i + 11, false);
                }

                ShowChart(0);              // 챠트 그리기
            }
            catch (Exception ex)
            {
                LoadingPopUp.LoadingPopUpHidden();
                CmnFunction.ShowMsgBox(ex.Message);
            }
            finally
            {
                LoadingPopUp.LoadingPopUpHidden();
            }
        }
コード例 #20
0
ファイル: PRD010702.cs プロジェクト: trantan490/web
        /// <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;
                }

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

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

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

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

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

                //5. 진도율 값 평균값 구하기(GrandTotal부분 & SubTotal 특정 컬럼 이용 직접 구하기)
                spdData.RPT_SetPerSubTotalAndGrandTotal(1, 6, 5, 7);

                //6. TAT 평균값 구하기(GrandTotal부분 & SubTotal)
                spdData.RPT_SetAvgSubTotalAndGrandTotal(1, 12, 0, false);

                dt.Dispose();
            }
            catch (Exception ex)
            {
                LoadingPopUp.LoadingPopUpHidden();
                CmnFunction.ShowMsgBox(ex.Message);
            }
            finally
            {
                LoadingPopUp.LoadingPopUpHidden();
            }
        }
コード例 #21
0
        private Boolean CheckField()
        {
            Boolean Check = false;

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

            return(Check);
        }
コード例 #22
0
        /// <summary>
        /// CheckField
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private Boolean CheckField()
        {
            if (cdvFactory.Text.Trim().Length == 0)
            {
                CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD001", GlobalVariable.gcLanguage));
                return(false);
            }

            //if (rbtDetail.Checked)
            //{
            //    if (cdvStep.Text.Trim().Length == 0)
            //    {
            //        CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD005", GlobalVariable.gcLanguage));
            //        return false;
            //    }
            //}

            //if (rbtBrief.Checked)
            //{
            //    if (cdvStepGrp.Text.Trim().Length == 0)
            //    {
            //        CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD005", GlobalVariable.gcLanguage));
            //        return false;
            //    }
            //}

            return(true);
        }
コード例 #23
0
        //Sample02 정의
        //private void Sample02_Load(object sender, EventArgs e)
        //{

        //}

        //ListBox 값 체크
        /// <summary>
        /// Check Condition
        /// </summary>
        /// <returns></returns>
        private Boolean Check_select()
        {
            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);
            }

            if (menu_select.SelectedIndex == -1)
            {
                MessageBox.Show("View Option 항목을 선택하십시요.", "알림");
                return(false);
            }

            if (cboPcs.SelectedIndex == -1)
            {
                MessageBox.Show("PCS 항목을 선택하십시요.", "알림");
                return(false);
            }
            return(true);
        }
コード例 #24
0
        private void spdData_CellClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e)
        {
            DataTable dt = null;

            try
            {
                GridColumnInit2();

                string schar_id = spdData.ActiveSheet.Cells[e.Row, 0].Value.ToString();

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

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

                spdData2.DataSource = dt;

                spdData2.RPT_AutoFit(false);
            }
            catch (Exception ex)
            {
                LoadingPopUp.LoadingPopUpHidden();
                CmnFunction.ShowMsgBox(ex.Message);
            }
            finally
            {
                LoadingPopUp.LoadingPopUpHidden();
                Cursor.Current = Cursors.Default;
            }
        }
コード例 #25
0
ファイル: SEC1103.cs プロジェクト: trantan490/web
        private void btnDelete_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtFunc.Text.Trim().Length == 0)
                {
                    CmnFunction.ShowMsgBox("Function Name : " + RptMessages.GetMessage("STD999", GlobalVariable.gcLanguage));
                }
                if (CmnFunction.ShowMsgBox(RptMessages.GetMessage("INF002", GlobalVariable.gcLanguage), "Delete", MessageBoxButtons.YesNo, 2) != System.Windows.Forms.DialogResult.Yes)
                {
                    return;
                }
                if (Delete_Function(txtFunc.Text.Trim()) == true)
                {
                    CmnFunction.ShowMsgBox(RptMessages.GetMessage("INF001", GlobalVariable.gcLanguage));

                    CmnInitFunction.FieldClear(this, null, false);
                    lisFunc.SelectedIndices.Clear();
                    lisFunc.Items.Clear();
                    ViewFunctionList(lisFunc);
                    //lisFunc.Items.Remove(lisFunc.SelectedItems[0]);
                }
            }
            catch (Exception ex)
            {
                CmnFunction.ShowMsgBox("SEC1103.btnDelete_Click() : " + ex.Message);
            }
        }
コード例 #26
0
ファイル: SEC1103.cs プロジェクト: trantan490/web
        private void btnCreate_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtFunc.Text.Trim().Length == 0)
                {
                    CmnFunction.ShowMsgBox("Function Name : " + RptMessages.GetMessage("STD999", GlobalVariable.gcLanguage));
                }
                if (Create_Function() == true)
                {
                    CmnFunction.ShowMsgBox(RptMessages.GetMessage("INF001", GlobalVariable.gcLanguage));

                    ListViewItem lstItem;

                    lstItem = lisFunc.Items.Add(txtFunc.Text.Trim(), (int)SMALLICON_INDEX.IDX_REPORT_FUNCTION);
                    lstItem.SubItems.Add(txtDesc.Text.Trim());
                    lstItem.Selected = true;
                    lisFunc.Sorting  = SortOrder.Ascending;
                    lisFunc.Sort();
                    lstItem.EnsureVisible();
                }
            }
            catch (Exception ex)
            {
                CmnFunction.ShowMsgBox("SEC1103.btnCreate_Click() : " + ex.ToString());
            }
        }
コード例 #27
0
ファイル: MAT070206.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;
                }

                //Total, Sub Total 적용 안하므로 아래 소스들 모두 주석 처리
                spdData.DataSource = dt;

                // 2012-04-17-배수민 : 주요 컬럼마다 색깔 부여
                for (int i = 0; i < spdData.ActiveSheet.ColumnCount; i++)
                {
                    if (spdData.ActiveSheet.Columns[i].Label == "Material group")
                    {
                        spdData.ActiveSheet.Columns[i].BackColor = Color.Azure;
                    }
                    else if (spdData.ActiveSheet.Columns[i].Label == "Effective date")
                    {
                        spdData.ActiveSheet.Columns[i].BackColor = Color.LightYellow;
                    }
                }

                ////4. Column Auto Fit
                spdData.RPT_AutoFit(false);
            }
            catch (Exception ex)
            {
                LoadingPopUp.LoadingPopUpHidden();
                CmnFunction.ShowMsgBox(ex.Message);
            }
            finally
            {
                LoadingPopUp.LoadingPopUpHidden();
            }
        }
コード例 #28
0
ファイル: PRD010424.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, 14, null, null, btnSort);
                //데이타테이블, 토탈 시작할 셀넘버, 시작 부터 서브토탈 몇개 쓸건지, 첫셀부터 몇번째 셀까지 TOTAL 적용안함

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

                //spdData.RPT_AutoFit(false);

                spdData.DataSource = dt;

                for (int i = 0; i < spdData.ActiveSheet.RowCount; i++)
                {
                    if (spdData.ActiveSheet.Cells[i, 13].Value.ToString() == "BOH")
                    {
                        spdData.ActiveSheet.Rows[i].BackColor = Color.LemonChiffon;
                    }
                }

                dt.Dispose();
            }
            catch (Exception ex)
            {
                LoadingPopUp.LoadingPopUpHidden();
                CmnFunction.ShowMsgBox(ex.Message);
            }
            finally
            {
                LoadingPopUp.LoadingPopUpHidden();
            }
        }
コード例 #29
0
ファイル: PQC031102.cs プロジェクト: trantan490/web
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>


        private void btnView_Click(object sender, EventArgs e)
        {
            DataTable dt = null;

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

            GridColumnInit();
            udcChartFX1.RPT_1_ChartInit();
            udcChartFX2.RPT_1_ChartInit();
            udcChartFX3.RPT_1_ChartInit();

            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;
                }

                int[] rowType = spdData.RPT_DataBindingWithSubTotal(dt, 0, 0, 1, null, null, btnSort);
                //Total부분 셀머지
                spdData.RPT_FillDataSelectiveCells("TOTAL", 0, 1, 0, 1, true, Align.Center, VerticalAlign.Center);

                spdData.RPT_AutoFit(false);

                dt.Dispose();

                // Chart 생성
                if (spdData.ActiveSheet.RowCount > 0)
                {
                    ShowChart1();
                    ShowChart2();
                    ShowChart3();
                }
            }
            catch (Exception ex)
            {
                LoadingPopUp.LoadingPopUpHidden();
                CmnFunction.ShowMsgBox(ex.Message);
            }
            finally
            {
                LoadingPopUp.LoadingPopUpHidden();
                Cursor.Current = Cursors.Default;
            }
        }
コード例 #30
0
 private void btnExcelExport_Click(object sender, EventArgs e)
 {
     if (spdData.Sheets[0].RowCount == 0)
     {
         MessageBox.Show(RptMessages.GetMessage("STD002", GlobalVariable.gcLanguage), "STD1501");
         return;
     }
     CmnExcelFunction.ExportToExcel(spdData, "Resource Analysis", "", true, false, false, -1, -1);
 }