private void btnView_Click(object sender, EventArgs e) { DataTable dt = null; string QueryCond = null; CheckField(); QueryCond = FwxCmnFunction.PackCondition(QueryCond, cdvFactory.Text); QueryCond = FwxCmnFunction.PackCondition(QueryCond, SelPrt);//Prompt TableName foreach (ListViewItem TempItems in listGrp.SelectedItems) { QueryCond = FwxCmnFunction.PackCondition(QueryCond, TempItems.Text); } spdData_Sheet1.RowCount = 0; this.Refresh(); dt = CmnFunction.oComm.GetFuncDataTable("TST1103", QueryCond); if (dt.Rows.Count == 0) { spdData.Visible = false; } else { spdData.Visible = true; } spdData_Sheet1.DataSource = dt; if (dt.Rows.Count > 0) { CmnFunction.FitColumnHeader(spdData); } dt.Dispose(); }
private void btnView_Click(object sender, EventArgs e) { DataTable dt = null; string QueryCond = null; CheckField(); QueryCond = FwxCmnFunction.PackCondition(QueryCond, cdvFactory.Text); QueryCond = FwxCmnFunction.PackCondition(QueryCond, dtpDate.Value.ToString("yyyyMMdd")); QueryCond = FwxCmnFunction.PackCondition(QueryCond, cdvOperGrpList.Text); QueryCond = FwxCmnFunction.PackCondition(QueryCond, txtOperGrp.Text); spdData_Sheet1.RowCount = 0; this.Refresh(); dt = CmnFunction.oComm.GetFuncDataTable("STD1204", QueryCond); if (dt.Rows.Count == 0) { spdData.Visible = false; } else { spdData.Visible = true; } spdData_Sheet1.DataSource = dt; CmnFunction.FitColumnHeader(spdData); dt.Dispose(); }
private void btnView_Click(object sender, EventArgs e) { DataTable dt = null; string QueryCond = null; CheckField(); QueryCond = FwxCmnFunction.PackCondition(QueryCond, cdvFactory.Text); QueryCond = FwxCmnFunction.PackCondition(QueryCond, cdvRes.Text); QueryCond = FwxCmnFunction.PackCondition(QueryCond, StartDate()); QueryCond = FwxCmnFunction.PackCondition(QueryCond, EndDate()); QueryCond = FwxCmnFunction.PackCondition(QueryCond, cdvOper.Text); spdData_Sheet1.RowCount = 0; this.Refresh(); dt = CmnFunction.oComm.GetFuncDataTable("STD1501", QueryCond); if (dt.Rows.Count == 0) { spdData.Visible = false; } else { spdData.Visible = true; } spdData.Sheets[0].DataSource = dt; CmnFunction.FitColumnHeader(spdData); dt.Dispose(); }
private void spdData_CellClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e) { DataTable dtDetail = null; string QueryCond = null; if (e.Row >= 0) { QueryCond = FwxCmnFunction.PackCondition(QueryCond, cdvFactory.Text); QueryCond = FwxCmnFunction.PackCondition(QueryCond, Convert.ToString(spdData.Sheets[0].GetValue(e.Row, 0))); QueryCond = FwxCmnFunction.PackCondition(QueryCond, Convert.ToString(spdData.Sheets[0].GetValue(e.Row, 1))); spdDataDetail_Sheet1.RowCount = 0; this.Refresh(); dtDetail = CmnFunction.oComm.GetFuncDataTable("STD1111_1", QueryCond); if (dtDetail.Rows.Count > 0) { spdDataDetail.Visible = true; } else { spdDataDetail.Visible = false; } spdDataDetail_Sheet1.DataSource = dtDetail; CmnFunction.FitColumnHeader(spdDataDetail); dtDetail.Dispose(); } }
private void btnView_Click(object sender, EventArgs e) { DataTable dt = null; string QueryCond = null; if (CheckField() == false) { return; } QueryCond = FwxCmnFunction.PackCondition(QueryCond, cdvFactory.Text); QueryCond = FwxCmnFunction.PackCondition(QueryCond, cdvMat.Text); QueryCond = FwxCmnFunction.PackCondition(QueryCond, dtpFromDate.Text.Replace("-", "")); QueryCond = FwxCmnFunction.PackCondition(QueryCond, dtpToDate.Text.Replace("-", "")); QueryCond = FwxCmnFunction.PackCondition(QueryCond, cdvMatVer.Text); spdData_Sheet1.RowCount = 0; this.Refresh(); dt = CmnFunction.oComm.GetFuncDataTable("STD1208", QueryCond); if (dt.Rows.Count == 0) { spdData.Visible = false; } else { spdData.Visible = true; } spdData_Sheet1.DataSource = dt; ultraChart1.Visible = false; if (dt.Rows.Count > 0) { MakeChart(dt); ultraChart1.SaveTo(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures) + @"\myChart.png", System.Drawing.Imaging.ImageFormat.Png); } dt.Dispose(); }
private void spdData_CellDoubleClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e) { DataTable dtDetail = null; string QueryCond = null; if (e.Row > 0) { QueryCond = FwxCmnFunction.PackCondition(QueryCond, Convert.ToString(spdData.Sheets[0].GetValue(e.Row, 0))); QueryCond = FwxCmnFunction.PackCondition(QueryCond, StartDate()); QueryCond = FwxCmnFunction.PackCondition(QueryCond, EndDate()); spdDataDetail_Sheet1.RowCount = 0; this.Refresh(); dtDetail = CmnFunction.oComm.GetFuncDataTable("TST1107_1", QueryCond); if (dtDetail.Rows.Count > 0) { spdDataDetail.Visible = true; } else { spdDataDetail.Visible = false; } //spdDataDetail_Sheet1.DataSource = dtDetail; //SubTotal사용 CmnSpdFunction.DataBindingWithSubTotal(spdDataDetail, dtDetail, 0, 1, 3); CmnFunction.FitColumnHeader(spdDataDetail); spdDataDetail.Sheets[0].Columns[3].Width = 120; dtDetail.Dispose(); } }
private void btnView_Click(object sender, EventArgs e) { DataTable dt = null; string QueryCond = null; CheckField(); QueryCond = FwxCmnFunction.PackCondition(QueryCond, cdvFactory.Text); QueryCond = FwxCmnFunction.PackCondition(QueryCond, dtpDate.Value.ToString("yyyyMMdd")); QueryCond = FwxCmnFunction.PackCondition(QueryCond, cdvOper.Text); QueryCond = FwxCmnFunction.PackCondition(QueryCond, cdvMatType.Text); QueryCond = FwxCmnFunction.PackCondition(QueryCond, cdvMatGrpList.Text); QueryCond = FwxCmnFunction.PackCondition(QueryCond, txtMatGrp.Text); spdData_Sheet1.RowCount = 0; this.Refresh(); dt = CmnFunction.oComm.GetFuncDataTable("STD1203", QueryCond); if (dt.Rows.Count == 0) { spdData.Visible = false; } else { spdData.Visible = true; } spdData_Sheet1.DataSource = dt; ultraChart1.Visible = false; if (dt.Rows.Count > 0) { CmnFunction.FitColumnHeader(spdData); MakeChart(dt); ultraChart1.SaveTo(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures) + @"\myChart.png", System.Drawing.Imaging.ImageFormat.Png); } dt.Dispose(); }
private void btnView_Click(object sender, EventArgs e) { DataTable dt = null; string QueryCond = null; CheckField(); QueryCond = FwxCmnFunction.PackCondition(QueryCond, dtpDelayDate.Value.ToString("yyyyMMdd")); QueryCond = FwxCmnFunction.PackCondition(QueryCond, udcFac.txtValue); QueryCond = FwxCmnFunction.PackCondition(QueryCond, udcMat.txtValue); QueryCond = FwxCmnFunction.PackCondition(QueryCond, udcMat.txtSubValue); QueryCond = FwxCmnFunction.PackCondition(QueryCond, udcFlow.txtValue); QueryCond = FwxCmnFunction.PackCondition(QueryCond, udcFlow.txtSubValue); QueryCond = FwxCmnFunction.PackCondition(QueryCond, udcOper.txtValue); spdData_Sheet1.RowCount = 0; this.Refresh(); dt = CmnFunction.oComm.GetFuncDataTable("TST1105", QueryCond); if (dt.Rows.Count == 0) { spdData.Visible = false; } else { spdData.Visible = true; } spdData_Sheet1.DataSource = dt; if (dt.Rows.Count > 0) { CmnFunction.FitColumnHeader(spdData); } dt.Dispose(); }
private void btnView_Click(object sender, EventArgs e) { DataTable dt = null; string QueryCond = null; CheckField(); QueryCond = FwxCmnFunction.PackCondition(QueryCond, cdvFactory.Text); QueryCond = FwxCmnFunction.PackCondition(QueryCond, cdvLotType.Text); QueryCond = FwxCmnFunction.PackCondition(QueryCond, cdvMatType.Text); QueryCond = FwxCmnFunction.PackCondition(QueryCond, txtMatGrp.Text); spdData_Sheet1.RowCount = 0; this.Refresh(); dt = CmnFunction.oComm.GetFuncDataTable("STD1106", QueryCond); if (dt.Rows.Count == 0) { spdData.Visible = false; } else { spdData.Visible = true; } CmnFunction.FitColumnHeader(spdData); spdData_Sheet1.DataSource = dt; dt.Dispose(); }
public string GetFuncDataString(string FunctionName, string QueryCond) { try { string sData = ""; string[] CondList; if (QueryCond != null) { CondList = FwxCmnFunction.UnPackCondition(QueryCond); } else { CondList = null; } switch (FunctionName) { case "GetSysTime": sData = oStdFunction.GetSysDate(); break; } return(sData); } catch (Exception ex) { throw ex; } }
private void ProcOperationList(String sStep) //등록된 Oper/OperGroup Function Item리스트 { string QueryCond = null; string QueryData = null; if (CheckField() && lisFunction.SelectedIndices.Count > 0) { QueryCond = FwxCmnFunction.PackCondition(QueryCond, cdvFactory.Text); QueryData = lisFunction.SelectedItems[0].SubItems[0].Text.Trim(); QueryCond = FwxCmnFunction.PackCondition(QueryCond, QueryData); switch (sStep) { case "1": QueryData = "OPR"; break; case "2": QueryData = "OPRGRP"; break; } QueryCond = FwxCmnFunction.PackCondition(QueryCond, QueryData); RptListFunction.ViewFuncItemList(lisProcOper, "1", QueryCond); GubunOprGrpList(QueryData); } }
public DataTable FillData(string TableName, string Step, string QueryCond) { DataTable dt = null; string sReturn; try { // 2012-08-22-임종우 : 모든 이벤트에 발생되어 부하 발생. 해당 기능 주석 처리 // 2010-09-02-정비재 : Query를 ClipBoard에 저장한다. //if (GlobalVariable.gsUserGroup == "ADMIN_GROUP" || GlobalVariable.gsUserGroup == "HANA_ADMIN_GROUP") //{ // // 2010-09-03-임종우 : QueryCond에 값이 있을 경우에만 저장 // if (!String.IsNullOrEmpty(QueryCond)) // { // System.Windows.Forms.Clipboard.SetText(QueryCond); // } //} sReturn = CmnFunction.GetErrorMessage(oWebService.FillData(TableName, Step, QueryCond)); dt = FwxCmnFunction.StringToDataTable(sReturn); return(dt); } catch (Exception ex) { throw ex; } }
public string GetFuncDataString(string FunctionName, string QueryCond) { try { string sData = ""; string[] CondList; if (QueryCond != null) { CondList = FwxCmnFunction.UnPackCondition(QueryCond); } else { CondList = null; } switch (FunctionName) { default: return(oStdMain.GetFuncDataString(FunctionName, QueryCond)); } return(sData); } catch (Exception ex) { throw ex; } }
public bool DeleteData(string TableName, string Step, string DeleteCond) { try { string[] CondList; if (DeleteCond != null) { CondList = FwxCmnFunction.UnPackCondition(DeleteCond); } else { CondList = null; } switch (TableName) { //case "RWEBFUNDEF": // if (Step == "1") // { // dt = SvrGlobalVariable.DBQuery.GetFuncDataTable("SEL_0CFUNCNAME", null, new string[] { CondList[0] }); // } // break; default: return(oStdMain.DeleteData(TableName, Step, DeleteCond)); } } catch (Exception ex) { throw ex; } }
private void btnView_Click(object sender, EventArgs e) { DataTable dt = null; string QueryCond = null; CheckField(); QueryCond = FwxCmnFunction.PackCondition(QueryCond, txtLotID.Text); spdData_Sheet1.RowCount = 0; this.Refresh(); dt = CmnFunction.oComm.GetFuncDataTable("STD1901", QueryCond); if (dt.Rows.Count != 0) { spdData.Visible = true; FillSpread(dt); } else { spdData.Sheets[0].RowCount = 0; spdData.Sheets[0].ColumnCount = 0; spdData.Visible = false; } CmnFunction.FitColumnHeader(spdData); dt.Dispose(); }
public static void ViewOperationList(Control objControl, string Factory) { DataTable dt = null; ListViewItem itmX = null; int iCnt; string QueryCond = null; QueryCond = FwxCmnFunction.PackCondition(QueryCond, Factory); dt = CmnFunction.oComm.GetFuncDataTable("VIEW_OPER_LIST", QueryCond); if (dt != null) { if (objControl is ListView) { for (iCnt = 0; iCnt < dt.Rows.Count; iCnt++) { itmX = new ListViewItem(dt.Rows[iCnt][0].ToString().TrimEnd(), (int)SMALLICON_INDEX.IDX_MATERIAL); if (((ListView)objControl).Columns.Count > 1) { itmX.SubItems.Add(dt.Rows[iCnt][1].ToString().TrimEnd()); } ((ListView)objControl).Items.Add(itmX); } } } }
public static void ViewMATGroupList(Control objControl, string Factory, string Item_Name) { DataTable dt = null; ListViewItem itmX = null; int iCnt; if (Factory.TrimEnd() == "") { return; } string QueryCond = null; QueryCond = FwxCmnFunction.PackCondition(QueryCond, Factory); QueryCond = FwxCmnFunction.PackCondition(QueryCond, Item_Name); dt = CmnFunction.oComm.GetFuncDataTable("ViewMATGroupList", QueryCond); if (objControl is ListView) { for (iCnt = 0; iCnt < dt.Rows.Count; iCnt++) { itmX = new ListViewItem(dt.Rows[iCnt]["Prompt"].ToString().TrimEnd(), (int)SMALLICON_INDEX.IDX_MATERIAL); if (((ListView)objControl).Columns.Count > 1) { itmX.SubItems.Add(dt.Rows[iCnt]["Group"].ToString().TrimEnd()); } ((ListView)objControl).Items.Add(itmX); } } }
private void btnView_Click(object sender, EventArgs e) { DataTable dt = null; string QueryCond = null; CheckField(); QueryCond = FwxCmnFunction.PackCondition(QueryCond, cdvFactory.Text); QueryCond = FwxCmnFunction.PackCondition(QueryCond, cdvLotType.Text); spdData_Sheet1.RowCount = 0; this.Refresh(); dt = CmnFunction.oComm.GetFuncDataTable("STD1101", QueryCond); if (dt.Rows.Count == 0) { //MessageBox.Show(RptMessages.GetMessage("STD010", GlobalVariable.gcLanguage), "STD1101"); spdData.Visible = false; } else { spdData.Visible = true; } spdData_Sheet1.DataSource = dt; ultraChart1.Visible = false; if (dt.Rows.Count > 0) { CmnFunction.FitColumnHeader(spdData); MakeChart(dt); ultraChart1.SaveTo(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures) + @"\myChart.png", System.Drawing.Imaging.ImageFormat.Png); } dt.Dispose(); }
private void spdData_CellClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e) { DataTable dt = null; string LossCode = null; string QueryCond = null; LossCode = Convert.ToString(spdData.Sheets[0].Cells[e.Row, 1].Value); QueryCond = FwxCmnFunction.PackCondition(QueryCond, cdvFactory.Text); QueryCond = FwxCmnFunction.PackCondition(QueryCond, StartDate()); QueryCond = FwxCmnFunction.PackCondition(QueryCond, EndDate()); QueryCond = FwxCmnFunction.PackCondition(QueryCond, LossCode); spdDataDetail_Sheet1.RowCount = 0; this.Refresh(); dt = CmnFunction.oComm.GetFuncDataTable("STD1604_1", QueryCond); if (dt.Rows.Count > 0) { spdDataDetail.Visible = true; } else { spdDataDetail.Visible = false; } spdDataDetail.Sheets[0].DataSource = dt; CmnFunction.FitColumnHeader(spdDataDetail); dt.Dispose(); }
private bool Detach_Column(int iRowIndex) { string QueryCond = null; DataTable dtDataTable = new DataTable(); try { QueryCond = ""; QueryCond = FwxCmnFunction.PackCondition(QueryCond, cdvFactory.Text); QueryCond = FwxCmnFunction.PackCondition(QueryCond, txtInqName.Text); QueryCond = FwxCmnFunction.PackCondition(QueryCond, lisAttachCol.Items[iRowIndex].Text); QueryCond = FwxCmnFunction.PackCondition(QueryCond, lisAttachCol.Items[iRowIndex].SubItems[2].Text); //Validation Check dtDataTable = CmnFunction.oComm.SelectData("RWEBFLXINQ", "1", QueryCond); if (dtDataTable.Rows.Count < 1) { CmnFunction.ShowMsgBox("This Inquiry is not exist. Please setup Inquiry first."); return(false); } dtDataTable = CmnFunction.oComm.SelectData("RWEBFLXCOL", "1", QueryCond); if (dtDataTable.Rows.Count == 0) { CmnFunction.ShowMsgBox("This Column is not exist."); } if (CmnFunction.oComm.DeleteData("RWEBFLXCOL", "2", QueryCond) != true) { CmnFunction.ShowMsgBox("Fatal database error is occured. Please contact admin person."); return(false); } else { //Sequence Sorter QueryCond = ""; QueryCond = FwxCmnFunction.PackCondition(QueryCond, cdvFactory.Text); QueryCond = FwxCmnFunction.PackCondition(QueryCond, txtInqName.Text); QueryCond = FwxCmnFunction.PackCondition(QueryCond, lisAttachCol.Items[iRowIndex].Text); if (CmnFunction.oComm.UpdateData("RWEBFLXCOL", "2", QueryCond) != true) { CmnFunction.ShowMsgBox("Fatal database error is occured. Please contact admin person."); return(false); } //lisAttachCol.Items[iRowIndex].Remove(); } return(true); } catch (Exception ex) { CmnFunction.ShowMsgBox(ex.ToString()); return(false); } }
private FACTORY_SHIFT Get_Factory_Shift() { FACTORY_SHIFT FactoryShift_tmp = new FACTORY_SHIFT(); DataTable rtDataTable = new DataTable(); string QueryCond = null; try { CmnFunction.oComm.SetUrl(); QueryCond = FwxCmnFunction.PackCondition(QueryCond, cdvFactory.Text); rtDataTable = CmnFunction.oComm.SelectData("MWIPFACDEF", "1", QueryCond); if (rtDataTable.Rows.Count == 0) { QueryCond = null; QueryCond = FwxCmnFunction.PackCondition(QueryCond, "SYSTEM"); rtDataTable = CmnFunction.oComm.SelectData("MWIPFACDEF", "1", QueryCond); } if (rtDataTable.Rows.Count > 0) { int i = 0; FactoryShift_tmp.shift = new FACTORY_SHIFT_SHIFT[4]; FactoryShift_tmp.shift[0] = new FACTORY_SHIFT_SHIFT(); FactoryShift_tmp.shift[1] = new FACTORY_SHIFT_SHIFT(); FactoryShift_tmp.shift[2] = new FACTORY_SHIFT_SHIFT(); FactoryShift_tmp.shift[3] = new FACTORY_SHIFT_SHIFT(); FactoryShift_tmp.shift[0].shift_day_flag = rtDataTable.Rows[i]["SHIFT_1_DAY_FLAG"].ToString(); FactoryShift_tmp.shift[0].shift_start = rtDataTable.Rows[i]["SHIFT_1_START"].ToString(); FactoryShift_tmp.shift[1].shift_day_flag = rtDataTable.Rows[i]["SHIFT_2_DAY_FLAG"].ToString(); FactoryShift_tmp.shift[1].shift_start = rtDataTable.Rows[i]["SHIFT_2_START"].ToString(); FactoryShift_tmp.shift[2].shift_day_flag = rtDataTable.Rows[i]["SHIFT_3_DAY_FLAG"].ToString(); FactoryShift_tmp.shift[2].shift_start = rtDataTable.Rows[i]["SHIFT_3_START"].ToString(); FactoryShift_tmp.shift[3].shift_day_flag = rtDataTable.Rows[i]["SHIFT_4_DAY_FLAG"].ToString(); FactoryShift_tmp.shift[3].shift_start = rtDataTable.Rows[i]["SHIFT_4_START"].ToString(); } if (rtDataTable.Rows.Count > 0) { rtDataTable.Dispose(); } return(FactoryShift_tmp); } catch (Exception ex) { CmnFunction.ShowMsgBox(ex.ToString()); return(FactoryShift_tmp); } }
private void SetDate(int Year, int Week) { DataTable rtDataTable = new DataTable(); string QueryCond = null; int i; try { CmnFunction.oComm.SetUrl(); QueryCond = FwxCmnFunction.PackCondition(QueryCond, Factory); QueryCond = FwxCmnFunction.PackCondition(QueryCond, dtpFromYear.Value.Year.ToString()); QueryCond = FwxCmnFunction.PackCondition(QueryCond, numFromWeek.Value.ToString()); rtDataTable = CmnFunction.oComm.SelectData("MWIPCALDEF", "2", QueryCond); if (rtDataTable.Rows.Count == 0) { QueryCond = null; QueryCond = FwxCmnFunction.PackCondition(QueryCond, "SYSTEM"); QueryCond = FwxCmnFunction.PackCondition(QueryCond, Factory); QueryCond = FwxCmnFunction.PackCondition(QueryCond, dtpFromYear.Value.Year.ToString()); QueryCond = FwxCmnFunction.PackCondition(QueryCond, numFromWeek.Value.ToString()); rtDataTable = CmnFunction.oComm.SelectData("MWIPCALDEF", "2", QueryCond); } if (rtDataTable.Rows.Count == 0) { //default } if (rtDataTable.Rows.Count > 0) { i = 0; DateTime dtTemp; if (CmnFunction.StringToDateTime(rtDataTable.Rows[i]["FROM_DATE"].ToString(), "yyyyMMdd", out dtTemp)) { dtpFromDate.Text = dtTemp.ToString(); } if (CmnFunction.StringToDateTime(rtDataTable.Rows[i]["TO_DATE"].ToString(), "yyyyMMdd", out dtTemp)) { dtpToDate.Text = dtTemp.ToString(); } } return; } catch (Exception ex) { CmnFunction.ShowMsgBox(ex.ToString()); return; } }
public static DataTable MaxMaterialVer(string Factory, string MatID) { DataTable dt = new DataTable(); string QueryCond = null; QueryCond = FwxCmnFunction.PackCondition(QueryCond, Factory); QueryCond = FwxCmnFunction.PackCondition(QueryCond, MatID); dt = CmnFunction.oComm.GetFuncDataTable("ViewMaxMaterialVerList", QueryCond); return(dt); }
/// <summary> /// Update RWEBGRPDEF Table. /// </summary> /// <param name="secGroupId"></param> /// <returns>bool : True or False</returns> private bool Update_Security_Group(string secGroupId) { string QueryCond, UpdateValue = ""; 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, secGroupId); rtDataTable = CmnFunction.oComm.SelectData("RWEBGRPDEF", "1", QueryCond); if (rtDataTable.Rows.Count > 0) { UpdateValue = ""; UpdateValue = FwxCmnFunction.PackCondition(UpdateValue, rtDataTable.Rows[0]["FACTORY"].ToString()); UpdateValue = FwxCmnFunction.PackCondition(UpdateValue, rtDataTable.Rows[0]["SEC_GRP_ID"].ToString()); UpdateValue = FwxCmnFunction.PackCondition(UpdateValue, txtDesc.Text.Trim()); UpdateValue = FwxCmnFunction.PackCondition(UpdateValue, txtCreateUser.Text.Trim()); UpdateValue = FwxCmnFunction.PackCondition(UpdateValue, txtCreateTime.Text.Trim()); UpdateValue = FwxCmnFunction.PackCondition(UpdateValue, GlobalVariable.gsUserID); UpdateValue = FwxCmnFunction.PackCondition(UpdateValue, sysCurrentDate); UpdateValue = FwxCmnFunction.PackCondition(UpdateValue, rtDataTable.Rows[0]["FACTORY"].ToString()); UpdateValue = FwxCmnFunction.PackCondition(UpdateValue, rtDataTable.Rows[0]["SEC_GRP_ID"].ToString()); if (CmnFunction.oComm.UpdateData("RWEBGRPDEF", "1", UpdateValue) != true) { CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD000", GlobalVariable.gcLanguage)); return(false); } } else { CmnFunction.ShowMsgBox(RptMessages.GetMessage("STD014", GlobalVariable.gcLanguage)); return(false); } return(true); } catch (Exception ex) { CmnFunction.ShowMsgBox("SEC1102.Update_Security_Group() : " + ex.ToString()); return(false); } }
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); } }
/// <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); } }
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); }
private void btnView_Click(object sender, EventArgs e) { DataTable RetDT = null; string QueryCond = null; if (CheckField() == false) { return; } QueryCond = FwxCmnFunction.PackCondition(QueryCond, cdvFactory.Text); if (rbtWaferID.Checked) { QueryCond = FwxCmnFunction.PackCondition(QueryCond, "1"); } else if (rbtInLotID.Checked) { QueryCond = FwxCmnFunction.PackCondition(QueryCond, "2"); } else if (rbtOutLotID.Checked) { QueryCond = FwxCmnFunction.PackCondition(QueryCond, "3"); } else if (rbtLasermark.Checked) { QueryCond = FwxCmnFunction.PackCondition(QueryCond, "4"); } QueryCond = FwxCmnFunction.PackCondition(QueryCond, txtID.Text); spdData_Sheet1.RowCount = 0; this.Refresh(); RetDT = CmnFunction.oComm.GetFuncDataTable("STD1905", QueryCond); if (RetDT.Rows.Count == 0) { spdData.Visible = false; } else { spdData.Visible = true; spdData_Sheet1.DataSource = RetDT; } CmnFunction.FitColumnHeader(spdData); RetDT.Dispose(); }
public void recv_RAS_Resource_Event(string sRequest, ref string sReply) { byte[] outByt = FwxCmnFunction.UnPackMessage(sRequest); StreamTransformer former = new StreamTransformerImpl(outByt); RAS_Resource_Event_In_Tag Resource_Event_In = new RAS_Resource_Event_In_Tag(); RAS_Resource_Event_Out_Tag Resource_Event_Out = new RAS_Resource_Event_Out_Tag(); MESType.transform_RAS_Resource_Event_In_Tag(former, ref Resource_Event_In); RAS_Resource_Event(Resource_Event_In, ref Resource_Event_Out); /* Call User Procedure */ former = new StreamTransformerImpl(); MESType.serialize_RAS_Resource_Event_Out_Tag(former, Resource_Event_Out); sReply = FwxCmnFunction.PackMessage(former.getBytes()); }
public void recv_WIP_View_Factory_Cmf_Item(string sRequest, ref string sReply) { byte[] outByt = FwxCmnFunction.UnPackMessage(sRequest); StreamTransformer former = new StreamTransformerImpl(outByt); WIP_View_Factory_Cmf_Item_In_Tag View_Factory_Cmf_Item_In = new WIP_View_Factory_Cmf_Item_In_Tag(); WIP_View_Factory_Cmf_Item_Out_Tag View_Factory_Cmf_Item_Out = new WIP_View_Factory_Cmf_Item_Out_Tag(); MESType.transform_WIP_View_Factory_Cmf_Item_In_Tag(former, ref View_Factory_Cmf_Item_In); WIP_View_Factory_Cmf_Item(View_Factory_Cmf_Item_In, ref View_Factory_Cmf_Item_Out); /* Call User Procedure */ former = new StreamTransformerImpl(); MESType.serialize_WIP_View_Factory_Cmf_Item_Out_Tag(former, View_Factory_Cmf_Item_Out); sReply = FwxCmnFunction.PackMessage(former.getBytes()); }