コード例 #1
0
        private void frmFMBSetupResourceImage_Load(object sender, System.EventArgs e)
        {
            try
            {
                modCommonFunction.CheckSecurityFormControl(this);
                modCommonFunction.GetTextboxStyle(this.Controls);
                modLanguageFunction.ToClientLanguage(this);
                CmnInitFunction.InitListView(lisResource);
                CmnInitFunction.InitListView(lisImagelist);
                ViewImageList();
                lisResource.SmallImageList = imlRes;

                modCommonFunction.CheckAllFactoryOption(cdvFactory);
                if (modGlobalVariable.gbAllFactory == false)
                {
                    CmnInitFunction.InitListView(lisResource);
                    lisResource.SmallImageList = imlRes;
                    modListRoutine.ViewResourceImageList(lisResource, '1', cdvFactory.Text);
                }
            }
            catch (Exception ex)
            {
                CmnFunction.ShowMsgBox("frmFMBSetupResourceImage.frmFMBSetupResourceImage_Load()" + "\r\n" + ex.Message, "FMB Client", MessageBoxButtons.OK, 1);
            }
        }
コード例 #2
0
ファイル: SEC1103.cs プロジェクト: trantan490/web
 private void SEC1103_Load(object sender, EventArgs e)
 {
     lisFunc.SmallImageList = ((System.Windows.Forms.TabControl)((System.Windows.Forms.TabPage) this.Parent).Parent).ImageList;
     CmnFunction.oComm.SetUrl();
     CmnInitFunction.InitListView(lisFunc);
     ViewFunctionList(lisFunc);
 }
コード例 #3
0
        private void View_Plan_List()
        {
            ListViewItem itmX = null;

            DataTable     dt           = null;
            StringBuilder strSqlString = new StringBuilder();

            int i;

            try
            {
                CmnInitFunction.InitListView(lisUploadData);

                strSqlString.Append("      SELECT DISTINCT PLAN_DATE FROM RWIPPLNDAT ");
                strSqlString.AppendFormat(" WHERE FACTORY = '{0}' ", this.Factory);
                strSqlString.AppendFormat("   AND PLAN_DATE LIKE '{0}%' ", dtpPlanYear.Value.ToString("yyyy") + dtpPlanMonth.Value.ToString("MM"));
                strSqlString.AppendFormat("   AND PLAN_TYPE = '{0}' ", this.Plan_Type);

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

                for (i = 0; i < dt.Rows.Count; i++)
                {
                    itmX = new ListViewItem(CmnFunction.MakeDateFormat(dt.Rows[i][0].ToString(), DATE_TIME_FORMAT.SHORTDATE), (int)SMALLICON_INDEX.IDX_CALENDAR);
                    lisUploadData.Items.Add(itmX);
                }
            }
            catch (Exception ex)
            {
                CmnFunction.ShowMsgBox("udcCUSReportUpload001.View_Plan_List() " + "\r\n" + ex.ToString());
            }
        }
コード例 #4
0
ファイル: udcFLXSetupInquiry.cs プロジェクト: trantan490/web
        private void InitCodeView()
        {
            cdvConFactory.Init();
            CmnInitFunction.InitListView(cdvConFactory.GetListView);
            cdvConFactory.Columns.Add("Factory", 150, HorizontalAlignment.Left);
            cdvConFactory.Columns.Add("Desc", 200, HorizontalAlignment.Left);
            cdvConFactory.SelectedSubItemIndex = 0;
            CmnListFunction.ViewFactoryList(cdvConFactory.GetListView, '1', "");

            cdvFactory.Init();
            CmnInitFunction.InitListView(cdvFactory.GetListView);
            cdvFactory.Columns.Add("Factory", 150, HorizontalAlignment.Left);
            cdvFactory.Columns.Add("Desc", 200, HorizontalAlignment.Left);
            cdvFactory.SelectedSubItemIndex = 0;
            CmnListFunction.ViewFactoryList(cdvFactory.GetListView, '1', "");

            cdvConInqGrp.Init();
            CmnInitFunction.InitListView(cdvConInqGrp.GetListView);
            cdvConInqGrp.Columns.Add("Group", 150, HorizontalAlignment.Left);
            cdvConInqGrp.Columns.Add("Desc", 200, HorizontalAlignment.Left);
            cdvConInqGrp.SelectedSubItemIndex = 0;

            cdvInqGrp.Init();
            CmnInitFunction.InitListView(cdvInqGrp.GetListView);
            cdvInqGrp.Columns.Add("Group", 150, HorizontalAlignment.Left);
            cdvInqGrp.Columns.Add("Desc", 200, HorizontalAlignment.Left);
            cdvInqGrp.SelectedSubItemIndex = 0;

            cdvSelItem.Init();
            CmnInitFunction.InitListView(cdvSelItem.GetListView);
            cdvSelItem.Columns.Add("Item", 150, HorizontalAlignment.Left);
            cdvSelItem.Columns.Add("Desc", 200, HorizontalAlignment.Left);
            cdvSelItem.SelectedSubItemIndex = 0;

            cdvSelValue.Init();
            CmnInitFunction.InitListView(cdvSelValue.GetListView);
            cdvSelValue.Columns.Add("Item", 150, HorizontalAlignment.Left);
            cdvSelValue.Columns.Add("Desc", 200, HorizontalAlignment.Left);
            cdvSelValue.SelectedSubItemIndex = 0;

            cdvSelGrpItem.Init();
            CmnInitFunction.InitListView(cdvSelGrpItem.GetListView);
            cdvSelGrpItem.Columns.Add("Item", 150, HorizontalAlignment.Left);
            cdvSelGrpItem.Columns.Add("Desc", 200, HorizontalAlignment.Left);
            cdvSelGrpItem.SelectedSubItemIndex = 0;

            cdvFilter.Init();
            CmnInitFunction.InitListView(cdvFilter.GetListView);
            cdvFilter.Columns.Add("Item", 150, HorizontalAlignment.Left);
            cdvFilter.Columns.Add("Desc", 200, HorizontalAlignment.Left);
            cdvFilter.SelectedSubItemIndex = 0;

            cdvFilterValue.Init();
            CmnInitFunction.InitListView(cdvFilterValue.GetListView);
            cdvFilterValue.Columns.Add("Item", 150, HorizontalAlignment.Left);
            cdvFilterValue.Columns.Add("Desc", 200, HorizontalAlignment.Left);
            cdvFilterValue.SelectedSubItemIndex = 0;

            CmnListFunction.ViewDataList(lisColList, '1', "SYSTEM", GlobalConstant.MP_GCM_FLEXWIP_COL_TBL);
        }
コード例 #5
0
ファイル: TST1104.cs プロジェクト: trantan490/web
        private void btnAttach_Click(object sender, EventArgs e)
        {
            int seq = 0;

            try
            {
                if (lisFunction.Items.Count != 0 &&
                    lisFunction.SelectedItems.Count != 0 &&
                    lisOper.Items.Count != 0 &&
                    lisOper.SelectedItems.Count != 0)
                {
                    if (lisProcOper.Items.Count == 0)
                    {
                        seq = 0;
                    }
                    else
                    {
                        if (lisProcOper.SelectedItems.Count == 0)
                        {
                            seq = lisProcOper.Items.Count;
                        }
                        else
                        {
                            seq = lisProcOper.SelectedItems[0].Index + 1;
                        }
                    }
                    for (int i = 0; i < lisOper.SelectedItems.Count; i++)
                    {
                        if (FindOper(lisOper.SelectedItems[i].SubItems[0].Text))
                        {
                            if (!UpdateProcOper("1", lisOper.SelectedItems[i].SubItems[0].Text.Trim(), seq, lisOper.SelectedItems[i].SubItems[1].Text.Trim()))
                            {
                                break;
                            }
                        }
                        seq += 1;
                    }

                    if (rbnOper.Checked)
                    {
                        CmnInitFunction.InitListView(lisProcOper);
                        CmnInitFunction.InitListView(lisOper);
                        ProcOperationList("1");
                    }
                    else
                    {
                        CmnInitFunction.InitListView(lisProcOper);
                        CmnInitFunction.InitListView(lisOper);
                        ProcOperationList("2");
                    }
                }
            }
            catch (Exception ex)
            {
                CmnFunction.ShowMsgBox(ex.ToString());
            }
        }
コード例 #6
0
        private void cdvFuncGrp_ButtonPress(object sender, EventArgs e)
        {
            cdvFuncGrp.Init();
            CmnInitFunction.InitListView(cdvFuncGrp.GetListView);
            cdvFuncGrp.Columns.Add("FUNC_GRP_ID", 100, HorizontalAlignment.Left);
            cdvFuncGrp.SelectedSubItemIndex = 0;

            ViewFuncGrpList(cdvFuncGrp.GetListView);
        }
コード例 #7
0
 private void cdvFactory_ButtonPress(object sender, EventArgs e)
 {
     cdvFactory.Init();
     CmnInitFunction.InitListView(cdvFactory.GetListView);
     cdvFactory.Columns.Add("Factory", 50, HorizontalAlignment.Left);
     cdvFactory.Columns.Add("Desc", 100, HorizontalAlignment.Left);
     cdvFactory.SelectedSubItemIndex = 0;
     RptListFunction.ViewFactoryList(cdvFactory.GetListView);
 }
コード例 #8
0
ファイル: TST1104.cs プロジェクト: trantan490/web
 private void rbnOpergrp_CheckedChanged(object sender, EventArgs e)
 {
     if (rbnOpergrp.Checked)
     {
         CmnInitFunction.InitListView(lisProcOper);
         CmnInitFunction.InitListView(lisOper);
         GubunOprGrpList("OPRGRP");
         ProcOperationList("2");
     }
 }
コード例 #9
0
        private void cdvMatGrp_ButtonPress(object sender, EventArgs e)
        {
            cdvMatGrp.Init();
            CmnInitFunction.InitListView(cdvMatGrp.GetListView);
            cdvMatGrp.Columns.Add("Prompt", 30, HorizontalAlignment.Left);
            cdvMatGrp.Columns.Add("Group", 70, HorizontalAlignment.Left);
            cdvMatGrp.SelectedSubItemIndex = 0;

            RptListFunction.ViewMATGroupList(cdvMatGrp.GetListView, cdvFactory.Text, "GRP_MATERIAL");
        }
コード例 #10
0
ファイル: STD1101.cs プロジェクト: trantan490/web
        private void cdvLotType_ButtonPress(object sender, EventArgs e)
        {
            cdvLotType.Init();
            CmnInitFunction.InitListView(cdvLotType.GetListView);
            cdvLotType.Columns.Add("KEY_1", 30, HorizontalAlignment.Left);
            cdvLotType.Columns.Add("DATA_1", 70, HorizontalAlignment.Left);
            cdvLotType.SelectedSubItemIndex = 0;

            RptListFunction.ViewGCMTableList(cdvLotType.GetListView, cdvFactory.Text, "LOT_TYPE");
        }
コード例 #11
0
        private void cdvRes_ButtonPress(object sender, EventArgs e)
        {
            cdvRes.Init();
            CmnInitFunction.InitListView(cdvRes.GetListView);
            cdvRes.Columns.Add("Factory", 50, HorizontalAlignment.Left);
            cdvRes.Columns.Add("Desc", 100, HorizontalAlignment.Left);
            cdvRes.SelectedSubItemIndex = 0;

            RptListFunction.ViewResourceList(cdvRes.GetListView, cdvFactory.Text.TrimEnd());
        }
コード例 #12
0
        private void cdvOper_ButtonPress(object sender, EventArgs e)
        {
            cdvOper.Init();
            CmnInitFunction.InitListView(cdvOper.GetListView);
            cdvOper.Columns.Add("KEY_1", 30, HorizontalAlignment.Left);
            cdvOper.Columns.Add("DATA_1", 70, HorizontalAlignment.Left);
            cdvOper.SelectedSubItemIndex = 0;

            RptListFunction.ViewOperList(cdvOper.GetListView, cdvFactory.Text, "");
        }
コード例 #13
0
ファイル: udcCondition.cs プロジェクト: trantan490/web
        private bool GetFlwSeqList(Control ctlList)
        {
            DataTable    rtDataTable  = new DataTable();
            ListViewItem itmX         = null;
            string       DinamicQuery = " ";

            try
            {
                if (ctlList is ListView)
                {
                    CmnInitFunction.InitListView((ListView)ctlList);
                }

                CmnFunction.oComm.SetUrl();

                if (this.sFactory != "")
                {
                    DinamicQuery += " WHERE FACTORY = '" + this.sFactory + "' ";
                    DinamicQuery += " AND MAT_ID = '" + this.ParentValue + "' AND MAT_VER = '" + this.ParentSubValue + "' ";
                    DinamicQuery += " AND FLOW = '" + cdvValue.Text + "' ";
                }
                else
                {//Flow Seq는 MWIPMATFLW에서 가져오므로 MAT_ID,MAT_VER의 정보가 없으면 Seq데이터 조회 불가.(Flow Seq Control의 Visible이 False됨)
                    DinamicQuery += " WHERE MAT_ID = '" + this.ParentValue + "' AND MAT_VER = '" + this.ParentSubValue + "' ";
                    DinamicQuery += " AND FLOW = '" + cdvValue.Text + "' ";
                }
                DinamicQuery += " ORDER BY FLOW_SEQ_NUM";

                rtDataTable = CmnFunction.oComm.FillData("MWIPFLWDEF", "3", DinamicQuery);


                if (rtDataTable.Rows.Count > 0)
                {
                    for (int i = 0; i < rtDataTable.Rows.Count; i++)
                    {
                        if (ctlList is ListView)
                        {
                            itmX = new ListViewItem(rtDataTable.Rows[i][0].ToString().TrimEnd());
                            ((ListView)ctlList).Items.Add(itmX);
                        }
                    }
                }

                if (rtDataTable.Rows.Count > 0)
                {
                    rtDataTable.Dispose();
                }
                return(true);
            }
            catch (Exception ex)
            {
                CmnFunction.ShowMsgBox(ex.ToString());
                return(false);
            }
        }
コード例 #14
0
 private void cdvFactory_TextBoxTextChanged(object sender, System.EventArgs e)
 {
     try
     {
         CmnInitFunction.InitListView(lisResource);
     }
     catch (Exception ex)
     {
         CmnFunction.ShowMsgBox("frmFMBSetupResourceImage.cdvFactory_TextBoxTextChanged()" + "\r\n" + ex.Message, "FMB Client", MessageBoxButtons.OK, 1);
     }
 }
コード例 #15
0
        public udcCUSReportUpload002()
        {
            InitializeComponent();

            //화면 오픈시 메뉴의 Desc값으로 Title변경. by John Seo. 2008.10.06.
            if (GlobalVariable.gsSelFuncName != "")
            {
                this.lblTitle.Text = GlobalVariable.gsSelFuncName;
            }

            CmnInitFunction.InitListView(lisUploadData);
        }
コード例 #16
0
ファイル: udcCondition.cs プロジェクト: trantan490/web
        private bool GetMatList(Control ctlList)
        {
            DataTable    rtDataTable  = new DataTable();
            ListViewItem itmX         = null;
            string       DinamicQuery = " ";

            try
            {
                if (ctlList is ListView)
                {
                    CmnInitFunction.InitListView((ListView)ctlList);
                }

                ((ListView)ctlList).SmallImageList = imlSmallIcon;

                CmnFunction.oComm.SetUrl();

                if (this.sFactory != "")
                {
                    DinamicQuery += " WHERE FACTORY = '" + this.sFactory + "'";
                }
                DinamicQuery += " ORDER BY MAT_ID";

                rtDataTable = CmnFunction.oComm.FillData("MWIPMATDEF", "1", DinamicQuery);

                if (rtDataTable.Rows.Count > 0)
                {
                    for (int i = 0; i < rtDataTable.Rows.Count; i++)
                    {
                        if (ctlList is ListView)
                        {
                            itmX = new ListViewItem(rtDataTable.Rows[i][0].ToString().TrimEnd(), (int)SMALLICON_INDEX.IDX_MATERIAL);
                            if (((ListView)ctlList).Columns.Count > 1)
                            {
                                itmX.SubItems.Add(rtDataTable.Rows[i][1].ToString().TrimEnd());
                            }
                            ((ListView)ctlList).Items.Add(itmX);
                        }
                    }
                }

                if (rtDataTable.Rows.Count > 0)
                {
                    rtDataTable.Dispose();
                }
                return(true);
            }
            catch (Exception ex)
            {
                CmnFunction.ShowMsgBox(ex.ToString());
                return(false);
            }
        }
コード例 #17
0
ファイル: CmnListFunction.cs プロジェクト: trantan490/web
        public static bool ViewFactoryList(System.Windows.Forms.Control ctlList, char cStep, string sType)
        {
            DataTable    rtDataTable = new DataTable();
            ListViewItem itmX        = null;
            string       QueryCond   = null;

            try
            {
                if (ctlList is ListView)
                {
                    CmnInitFunction.InitListView((ListView)ctlList);
                }

                CmnFunction.oComm.SetUrl();

                QueryCond = FwxCmnFunction.PackCondition(QueryCond, sType);

                rtDataTable = CmnFunction.oComm.FillData("MWIPFACDEF", cStep.ToString(), QueryCond);

                if (rtDataTable.Rows.Count > 0)
                {
                    for (int i = 0; i < rtDataTable.Rows.Count; i++)
                    {
                        if (ctlList is ListView)
                        {
                            itmX = new ListViewItem(rtDataTable.Rows[i]["FACTORY"].ToString().TrimEnd(), (int)SMALLICON_INDEX.IDX_SEC_GROUP);
                            if (((ListView)ctlList).Columns.Count > 1)
                            {
                                itmX.SubItems.Add(rtDataTable.Rows[i]["FAC_DESC"].ToString().TrimEnd());
                            }
                            ((ListView)ctlList).Items.Add(itmX);
                        }
                        else if (ctlList is TreeView)
                        {
                        }
                        else if (ctlList is ComboBox)
                        {
                        }
                    }
                }

                if (rtDataTable.Rows.Count > 0)
                {
                    rtDataTable.Dispose();
                }
                return(true);
            }
            catch (Exception ex)
            {
                CmnFunction.ShowMsgBox(ex.ToString());
                return(false);
            }
        }
コード例 #18
0
ファイル: udcCondition.cs プロジェクト: trantan490/web
        private bool GetFactoryList(Control ctlList)
        {
            DataTable    rtDataTable = new DataTable();
            ListViewItem itmX        = null;
            string       QueryCond   = null;

            try
            {
                if (ctlList is ListView)
                {
                    CmnInitFunction.InitListView((ListView)ctlList);
                }

                ((ListView)ctlList).SmallImageList = imlSmallIcon;

                CmnFunction.oComm.SetUrl();

                rtDataTable = CmnFunction.oComm.FillData("MWIPFACDEF", "1", QueryCond);

                if (rtDataTable.Rows.Count > 0)
                {
                    for (int i = 0; i < rtDataTable.Rows.Count; i++)
                    {
                        if (ctlList is ListView)
                        {
                            itmX = new ListViewItem(rtDataTable.Rows[i]["FACTORY"].ToString().TrimEnd(), (int)SMALLICON_INDEX.IDX_FACTORY);
                            if (((ListView)ctlList).Columns.Count > 1)
                            {
                                itmX.SubItems.Add(rtDataTable.Rows[i]["FAC_DESC"].ToString().TrimEnd());
                            }
                            ((ListView)ctlList).Items.Add(itmX);
                        }
                        else if (ctlList is TreeView)
                        {
                        }
                        else if (ctlList is ComboBox)
                        {
                        }
                    }
                }

                if (rtDataTable.Rows.Count > 0)
                {
                    rtDataTable.Dispose();
                }
                return(true);
            }
            catch (Exception ex)
            {
                CmnFunction.ShowMsgBox(ex.ToString());
                return(false);
            }
        }
コード例 #19
0
ファイル: CmnListFunction.cs プロジェクト: trantan490/web
        public static bool View_Inquiry_List(System.Windows.Forms.Control ctlList, char cStep, string sFactory, string sGroup)
        {
            DataTable    rtDataTable = new DataTable();
            ListViewItem itmX        = null;
            string       QueryCond   = null;

            try
            {
                if (ctlList is ListView)
                {
                    CmnInitFunction.InitListView((ListView)ctlList);
                }


                QueryCond = FwxCmnFunction.PackCondition(QueryCond, sFactory);
                QueryCond = FwxCmnFunction.PackCondition(QueryCond, sGroup);

                rtDataTable = CmnFunction.oComm.FillData("RWEBFLXINQ", cStep.ToString(), QueryCond);

                if (rtDataTable.Rows.Count > 0)
                {
                    for (int i = 0; i < rtDataTable.Rows.Count; i++)
                    {
                        if (ctlList is ListView)
                        {
                            itmX = new ListViewItem(rtDataTable.Rows[i]["INQUIRY_NAME"].ToString().TrimEnd(), (int)SMALLICON_INDEX.IDX_FUNCTION);
                            itmX.SubItems.Add(rtDataTable.Rows[i]["INQUIRY_DESC"].ToString().TrimEnd());

                            ((ListView)ctlList).Items.Add(itmX);
                        }
                        else if (ctlList is TreeView)
                        {
                        }
                        else if (ctlList is ComboBox)
                        {
                        }
                    }
                }

                if (rtDataTable.Rows.Count > 0)
                {
                    rtDataTable.Dispose();
                }
            }
            catch (Exception ex)
            {
                CmnFunction.ShowMsgBox(ex.ToString());
                return(false);
            }

            return(true);
        }
コード例 #20
0
 private void cdvFactory_SelectedItemChanged(object sender, Miracom.UI.MCCodeViewSelChanged_EventArgs e)
 {
     try
     {
         CmnInitFunction.InitListView(lisResource);
         lisResource.SmallImageList = imlRes;
         modListRoutine.ViewResourceImageList(lisResource, '1', cdvFactory.Text);
     }
     catch (Exception ex)
     {
         CmnFunction.ShowMsgBox("frmFMBSetupResourceImage.cdvFactory_SelectedItemChanged()" + "\r\n" + ex.Message, "FMB Client", MessageBoxButtons.OK, 1);
     }
 }
コード例 #21
0
ファイル: TST1104.cs プロジェクト: trantan490/web
 private void cdvFactory_SelectedItemChanged(object sender, Miracom.UI.MCCodeViewSelChanged_EventArgs e)
 {
     if (rbnOper.Checked)
     {
         CmnInitFunction.InitListView(lisOper);
         GubunOprGrpList("OPR");
     }
     else
     {
         CmnInitFunction.InitListView(lisOper);
         GubunOprGrpList("OPRGRP");
     }
 }
コード例 #22
0
ファイル: RptCUSListFunction.cs プロジェクト: trantan490/web
        public static bool GetFlwList(Control ctlList, string sFactory)
        {
            DataTable    rtDataTable  = new DataTable();
            ListViewItem itmX         = null;
            string       DinamicQuery = " ";

            try
            {
                if (ctlList is ListView)
                {
                    CmnInitFunction.InitListView((ListView)ctlList);
                }

                CmnFunction.oComm.SetUrl();

                if (sFactory != "")
                {
                    DinamicQuery += " WHERE FACTORY = '" + sFactory + "'";
                }

                rtDataTable = CmnFunction.oComm.FillData("MWIPFLWDEF", "4", DinamicQuery);

                if (rtDataTable.Rows.Count > 0)
                {
                    for (int i = 0; i < rtDataTable.Rows.Count; i++)
                    {
                        if (ctlList is ListView)
                        {
                            itmX = new ListViewItem(rtDataTable.Rows[i][0].ToString().TrimEnd(), (int)SMALLICON_INDEX.IDX_FLOW);
                            if (((ListView)ctlList).Columns.Count > 1)
                            {
                                itmX.SubItems.Add(rtDataTable.Rows[i][1].ToString().TrimEnd());
                            }
                            ((ListView)ctlList).Items.Add(itmX);
                        }
                    }
                }

                if (rtDataTable.Rows.Count > 0)
                {
                    rtDataTable.Dispose();
                }

                return(true);
            }
            catch (Exception ex)
            {
                CmnFunction.ShowMsgBox(ex.ToString());
                return(false);
            }
        }
コード例 #23
0
ファイル: udcFLXSetupInquiry.cs プロジェクト: trantan490/web
        private void udcFLXSetupInquiry_Load(object sender, EventArgs e)
        {
            CmnFunction.oComm.SetUrl();

            CmnInitFunction.InitListView(lisInqList);
            CmnInitFunction.InitListView(lisColList);
            CmnInitFunction.InitListView(lisAttachCol);

            InitCodeView();

            cboPeriod.SelectedIndex   = 0;
            cboLogical.SelectedIndex  = 0;
            cboOperator.SelectedIndex = 0;
        }
コード例 #24
0
ファイル: udcCondition.cs プロジェクト: trantan490/web
        private bool GetMatVerList(Control ctlList)
        {
            DataTable    rtDataTable  = new DataTable();
            ListViewItem itmX         = null;
            string       DinamicQuery = " ";

            try
            {
                if (ctlList is ListView)
                {
                    CmnInitFunction.InitListView((ListView)ctlList);
                }

                CmnFunction.oComm.SetUrl();

                if (this.sFactory != "")
                {
                    DinamicQuery += " WHERE FACTORY = '" + this.sFactory + "' AND MAT_ID = '" + cdvValue.Text + "' ";
                }
                else
                {
                    DinamicQuery += " WHERE MAT_ID = '" + cdvValue.Text + "' ";
                }

                rtDataTable = CmnFunction.oComm.FillData("MWIPMATDEF", "2", DinamicQuery);

                if (rtDataTable.Rows.Count > 0)
                {
                    for (int i = 0; i < rtDataTable.Rows.Count; i++)
                    {
                        if (ctlList is ListView)
                        {
                            itmX = new ListViewItem(rtDataTable.Rows[i][0].ToString().TrimEnd());
                            ((ListView)ctlList).Items.Add(itmX);
                        }
                    }
                }

                if (rtDataTable.Rows.Count > 0)
                {
                    rtDataTable.Dispose();
                }
                return(true);
            }
            catch (Exception ex)
            {
                CmnFunction.ShowMsgBox(ex.ToString());
                return(false);
            }
        }
コード例 #25
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, "");
        }
コード例 #26
0
ファイル: udcFLXSetupInquiry.cs プロジェクト: trantan490/web
        public Boolean View_Inquiry_Column(char cStep, string sFactory, string sInqName)
        {
            DataTable rtDataTable = new DataTable();
            string    QueryCond   = null;

            int i;

            try
            {
                CmnInitFunction.InitListView(lisAttachCol);

                QueryCond = FwxCmnFunction.PackCondition(QueryCond, sFactory);
                QueryCond = FwxCmnFunction.PackCondition(QueryCond, sInqName);

                rtDataTable = CmnFunction.oComm.FillData("RWEBFLXCOL", "1", QueryCond);

                if (rtDataTable.Rows.Count == 0)
                {
                    return(false);
                }

                if (rtDataTable.Rows.Count > 0)
                {
                    for (i = 0; i < rtDataTable.Rows.Count; i++)
                    {
                        ListViewItem itmX = null;

                        itmX = new ListViewItem(rtDataTable.Rows[i]["COLUMN_SEQ"].ToString());
                        itmX.SubItems.Add(rtDataTable.Rows[i]["COLUMN_PERIOD"].ToString());
                        itmX.SubItems.Add(rtDataTable.Rows[i]["COLUMN_NAME"].ToString());

                        lisAttachCol.Items.Add(itmX);
                    }
                }
                if (rtDataTable.Rows.Count > 0)
                {
                    rtDataTable.Dispose();
                }
            }
            catch (Exception ex)
            {
                CmnFunction.ShowMsgBox(ex.ToString());
                return(false);
            }

            return(true);
        }
コード例 #27
0
ファイル: RptCUSListFunction.cs プロジェクト: trantan490/web
        public static bool GetTableList(Control ctlList, string sFactory, string sTable_Name)
        {
            DataTable    rtDataTable = new DataTable();
            ListViewItem itmX        = null;

            try
            {
                if (ctlList is ListView)
                {
                    CmnInitFunction.InitListView((ListView)ctlList);
                }

                CmnFunction.oComm.SetUrl();

                string QueryCond = null;

                QueryCond = FwxCmnFunction.PackCondition(QueryCond, sFactory);
                QueryCond = FwxCmnFunction.PackCondition(QueryCond, sTable_Name);

                rtDataTable = CmnFunction.oComm.GetFuncDataTable("ViewGCMTableList", QueryCond);

                if (rtDataTable.Rows.Count > 0)
                {
                    for (int i = 0; i < rtDataTable.Rows.Count; i++)
                    {
                        if (ctlList is ListView)
                        {
                            itmX = new ListViewItem(rtDataTable.Rows[i][2].ToString().TrimEnd(), (int)SMALLICON_INDEX.IDX_CODE_DATA);
                            if (((ListView)ctlList).Columns.Count > 1)
                            {
                                itmX.SubItems.Add(rtDataTable.Rows[i][12].ToString().TrimEnd());
                            }
                            ((ListView)ctlList).Items.Add(itmX);
                        }
                    }
                }

                return(true);
            }
            catch (Exception ex)
            {
                CmnFunction.ShowMsgBox(ex.ToString());
                return(false);
            }
        }
コード例 #28
0
 private void btnDel_Click(System.Object sender, System.EventArgs e)
 {
     try
     {
         if (CheckCondition("DELETE") == false)
         {
             return;
         }
         if (Update_Resource_Image(modGlobalConstant.MP_STEP_DELETE) == true)
         {
             CmnInitFunction.InitListView(lisResource);
             lisResource.SmallImageList = imlRes;
             modListRoutine.ViewResourceImageList(lisResource, '1', cdvFactory.Text);
         }
     }
     catch (Exception ex)
     {
         CmnFunction.ShowMsgBox("frmFMBSetupResourceImage.btnDel_Click()" + "\r\n" + ex.Message, "FMB Client", MessageBoxButtons.OK, 1);
     }
 }
コード例 #29
0
        private void InitCodeView()
        {
            cdvFactory.Init();
            CmnInitFunction.InitListView(cdvFactory.GetListView);
            cdvFactory.Columns.Add("Factory", 150, HorizontalAlignment.Left);
            cdvFactory.Columns.Add("Desc", 200, HorizontalAlignment.Left);
            cdvFactory.SelectedSubItemIndex = 0;
            CmnListFunction.ViewFactoryList(cdvFactory.GetListView, '1', "");

            cdvInqGrp.Init();
            CmnInitFunction.InitListView(cdvInqGrp.GetListView);
            cdvInqGrp.Columns.Add("Group", 150, HorizontalAlignment.Left);
            cdvInqGrp.Columns.Add("Desc", 200, HorizontalAlignment.Left);
            cdvInqGrp.SelectedSubItemIndex = 0;

            cdvInqName.Init();
            CmnInitFunction.InitListView(cdvInqName.GetListView);
            cdvInqName.Columns.Add("Name", 150, HorizontalAlignment.Left);
            cdvInqName.Columns.Add("Desc", 200, HorizontalAlignment.Left);
            cdvInqName.SelectedSubItemIndex = 0;
        }
コード例 #30
0
        private void InitControl()
        {
            CmnInitFunction.InitListView(lisList);

            switch (m_e_condition_type)
            {
            case eConditionype.FACCMF:
                lisList.Columns.Clear();
                lisList.Columns.Add("PROMPT", 100, HorizontalAlignment.Left);
                lisList.Columns.Add("TABLE_NAME", 130, HorizontalAlignment.Left);
                lisList.MultiSelect = false;
                break;

            case eConditionype.GCMGRP:
                lisList.Columns.Clear();
                lisList.Columns.Add("GROUP", 100, HorizontalAlignment.Left);
                lisList.Columns.Add("DESC", 130, HorizontalAlignment.Left);
                lisList.MultiSelect = true;
                break;
            }
        }