コード例 #1
0
        private void Form_AddItemButtonClicked(object pSender, EventArgs pEventArgs)
        {
            try
            {
                CoFAS_DevExpressManager.SetCursor(this, Cursors.WaitCursor);

                PO.UserForm.frmCommonPopup.USER_CODE     = _pUSER_CODE;
                PO.UserForm.frmCommonPopup.LANGUAGE_TYPE = _pLANGUAGE_TYPE;
                PO.UserForm.frmCommonPopup.FONT_TYPE     = _pFONT_SETTING;

                PO.UserForm.frmCommonPopup.ARRAY = new object[2] {
                    "WorkOrder", ""
                };                                                                                            //넘기는 파라메터 에 따라 설정, 제품/조회할때 품목명을 던지기
                PO.UserForm.frmCommonPopup xfrmCommonPopup = new PO.UserForm.frmCommonPopup("WorkOrderInfo"); //유저컨트롤러 설정 부분


                xfrmCommonPopup.ShowDialog();

                if (xfrmCommonPopup.dtReturn == null)
                {
                    xfrmCommonPopup.Dispose();
                    return;
                }

                if (xfrmCommonPopup.dtReturn != null && xfrmCommonPopup.dtReturn.Rows.Count > 0)
                {
                    _pLocation_Code = xfrmCommonPopup.dtReturn.Rows[0]["PRODUCTION_PLAN_ID"].ToString();
                }

                xfrmCommonPopup.Dispose();


                // if(xfrmCommonPopup.dtReturn.Rows.Count !=0)
                //
                // {
                Form_SearchButtonClicked(null, null);
                // }
            }
            catch (ExceptionManager pExceptionManager)
            {
                CoFAS_DevExpressManager.ShowErrorMessage(string.Format("{0}\n{1}", pExceptionManager.Exception.Message.ToString(), pExceptionManager.TargetSite.ToString()));
            }
            finally
            {
                CoFAS_DevExpressManager.SetCursor(this, Cursors.Default);
            }
        }
コード例 #2
0
        private void _luTPART_CODE__OnOpenClick(object sender, EventArgs e)
        {
            try
            {
                PO.UserForm.frmCommonPopup.CRUD          = "R";
                PO.UserForm.frmCommonPopup.USER_CODE     = _pUSER_CODE;
                PO.UserForm.frmCommonPopup.LANGUAGE_TYPE = _pLANGUAGE_TYPE;
                //PO.UserForm.frmCommonPopup.FONT_TYPE = _pFONT_SETTING;

                // 0 서비스네임 1 공통코드경우 CODE_TYPE 으로구분자 올린다.
                PO.UserForm.frmCommonPopup.ARRAY = new object[2] {
                    "", ""
                };
                PO.UserForm.frmCommonPopup.ARRAY_CODE = new object[2] {
                    _luTPART_CODE.CodeText.ToString(), _luTPART_CODE.NameText.ToString()
                };
                PO.UserForm.frmCommonPopup xfrmCommonPopup = new PO.UserForm.frmCommonPopup("ucProductionPartListPopup");  // new CORE.UserForm.frmCommonPopup("CommonCode"); //유저컨트롤러 설정 부분

                xfrmCommonPopup.ShowDialog();

                if (xfrmCommonPopup.dtReturn == null)
                {
                    xfrmCommonPopup.Dispose();
                    return;
                }

                if (xfrmCommonPopup.dtReturn != null && xfrmCommonPopup.dtReturn.Rows.Count > 0)
                {
                    _luTPART_CODE.CodeText = xfrmCommonPopup.dtReturn.Rows[0]["VEND_PART_CODE"].ToString();
                    _luTPART_CODE.NameText = xfrmCommonPopup.dtReturn.Rows[0]["PART_NAME"].ToString();

                    _pucOutsourcingInfoPopupEntity.PART_CODE = xfrmCommonPopup.dtReturn.Rows[0]["PART_CODE"].ToString();
                }

                xfrmCommonPopup.Dispose();
            }
            catch (ExceptionManager pExceptionManager)
            {
                CoFAS_DevExpressManager.ShowErrorMessage(string.Format("{0}\n{1}", pExceptionManager.Exception.Message.ToString(), pExceptionManager.TargetSite.ToString()));
            }
            finally
            {
                CoFAS_DevExpressManager.SetCursor(this, Cursors.Default);
            }
        }
コード例 #3
0
        private void _ucbtSearch_Click(object sender, EventArgs e)
        {
            try
            {
                PO.UserForm.frmCommonPopup.USER_CODE     = _pUSER_CODE;
                PO.UserForm.frmCommonPopup.LANGUAGE_TYPE = _pLANGUAGE_TYPE;
                PO.UserForm.frmCommonPopup.FONT_TYPE     = fntPARENT_FONT;
                PO.UserForm.frmCommonPopup.ARRAY         = new object[2] {
                    "", ""
                };                                                           //넘기는 파라메터 에 따라 설정, 제품/조회할때 품목명을 던지기
                PO.UserForm.frmCommonPopup.ARRAY_CODE = new object[2] {
                    "", ""
                };
                PO.UserForm.frmCommonPopup xfrmCommonPopup1 = new PO.UserForm.frmCommonPopup("ucMaterialUsagePartListPopup"); //유저컨트롤러 설정 부분

                xfrmCommonPopup1.ShowDialog();

                if (xfrmCommonPopup1.dtReturn == null)
                {
                    xfrmCommonPopup1.Dispose();
                    return;
                }

                if (xfrmCommonPopup1.dtReturn != null && xfrmCommonPopup1.dtReturn.Rows.Count > 0)
                {
                    DataTable dt = (_gdSUB.DataSource as DataTable);

                    if (!xfrmCommonPopup1.dtReturn.Columns.Contains("PRODUCTION_ORDER_ID"))
                    {
                        xfrmCommonPopup1.dtReturn.Columns.Add(new DataColumn("PRODUCTION_ORDER_ID", typeof(string)));
                    }

                    if (!xfrmCommonPopup1.dtReturn.Columns.Contains("LOT_ID"))
                    {
                        xfrmCommonPopup1.dtReturn.Columns.Add(new DataColumn("LOT_ID", typeof(string)));
                    }

                    if (!xfrmCommonPopup1.dtReturn.Columns.Contains("PROCESS_CODE"))
                    {
                        xfrmCommonPopup1.dtReturn.Columns.Add(new DataColumn("PROCESS_CODE", typeof(string)));
                    }

                    if (!xfrmCommonPopup1.dtReturn.Columns.Contains("USAGE_DATE"))
                    {
                        xfrmCommonPopup1.dtReturn.Columns.Add(new DataColumn("USAGE_DATE", typeof(string)));
                    }

                    if (!xfrmCommonPopup1.dtReturn.Columns.Contains("USAGE_QTY"))
                    {
                        xfrmCommonPopup1.dtReturn.Columns.Add(new DataColumn("USAGE_QTY", typeof(string)));
                    }


                    for (int i = 0; i < xfrmCommonPopup1.dtReturn.Rows.Count; i++)
                    {
                        xfrmCommonPopup1.dtReturn.Rows[i]["CRUD"] = "C";
                        xfrmCommonPopup1.dtReturn.Rows[i]["PRODUCTION_ORDER_ID"] = _pucMeterialUsagePopupEntity.PRODUCTINO_ORDER_ID;
                        xfrmCommonPopup1.dtReturn.Rows[i]["LOT_ID"]       = _pucMeterialUsagePopupEntity.LOT_ID;
                        xfrmCommonPopup1.dtReturn.Rows[i]["PROCESS_CODE"] = _pucMeterialUsagePopupEntity.PROCESS_CODE;
                        xfrmCommonPopup1.dtReturn.Rows[i]["USAGE_DATE"]   = DateTime.Now.ToString("yyyyMMdd");
                        xfrmCommonPopup1.dtReturn.Rows[i]["USAGE_QTY"]    = 0;
                        if (!(CoFAS_ConvertManager.DataTable_FindCount(dt, "PART_CODE = '" + xfrmCommonPopup1.dtReturn.Rows[i]["PART_CODE"].ToString() + "'", "")))
                        {
                            dt.ImportRow(xfrmCommonPopup1.dtReturn.Rows[i]);
                        }
                    }
                }

                xfrmCommonPopup1.Dispose();
            }
            catch (ExceptionManager pExceptionManager)
            {
                CoFAS_DevExpressManager.ShowErrorMessage(string.Format("{0}\n{1}", pExceptionManager.Exception.Message.ToString(), pExceptionManager.TargetSite.ToString()));
            }
            catch (Exception pex)
            {
                CoFAS_DevExpressManager.ShowErrorMessage("" + pex.ToString());
            }
        }