private void btnSearch_Click(object sender, EventArgs e) { if (chk_all != null && chk_all.Checked) { txt_raw_cd.Text = ""; txt_raw_nm.Text = ""; txt_raw_gubun.Text = ""; txt_Check_Yn.Text = ""; txt_Cust_Nm.Text = ""; txt_balstock.Text = ""; txt_srch.Text = ""; txt_srch2.Text = ""; txt_item_grade1.Text = ""; txt_item_grade2.Text = ""; txt_item_grade3.Text = ""; txt_grade1.Text = ""; txt_grade2.Text = ""; txt_grade3.Text = ""; in_grid_logic(); } else { if (txt_srch2.Text == null || txt_srch2.Text.Equals("")) { MessageBox.Show("조회할 원자재를 선택해주십시오"); return; } in_grid_logic(); calBalstock_logic(); in_Item_grade_logic(); } wnGConstant wng = new wnGConstant(); wng.mergeCells(inputRmGrid, 3); }
private void txt_srch_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { Popup.pop거래처검색 msg = new Popup.pop거래처검색(); msg.sCustGbn = "2"; msg.txtSrch.Text = txt_srch.Text.ToString(); msg.ShowDialog(); if (msg.sCode != null && !msg.sCode.Equals("")) { txt_srch.Text = msg.sName; txt_srch2.Text = msg.sCode; input_cust_list(); inputRmGrid.Rows.Clear(); in_grid_logic(); in_grade_logic(); calBalance_logic(); wnGConstant wng = new wnGConstant(); wng.mergeCells(inputRmGrid, 3); } } }
private void pop계산서매출검색_Load(object sender, EventArgs e) { ComInfo.gridHeaderSet(GridRecord); start_date.Text = DateTime.Now.ToString().Substring(0, 8) + "01"; lbl_cust_nm.Text = sName; ComInfo cominfo = new ComInfo(); wnGConstant wConst = new wnGConstant(); string sqlQuery = ""; cmb_vat_cd.ValueMember = "코드"; cmb_vat_cd.DisplayMember = "명칭"; sqlQuery = cominfo.queryVatAll(); wConst.ComboBox_Read_NoBlank(cmb_vat_cd, sqlQuery); cmb_vat_cd.SelectedValue = sVatCd; rsTable.Columns.Add("매출일자"); rsTable.Columns.Add("번호"); rsTable.Columns.Add("순번"); rsTable.Columns.Add("부가세구분"); rsTable.Columns.Add("상품명"); rsTable.Columns.Add("규격"); rsTable.Columns.Add("총수량"); rsTable.Columns.Add("단가"); rsTable.Columns.Add("금액"); rsTable.Columns.Add("상품코드"); rsTable.Columns.Add("상품구분"); bindData("where B.CUST_CD = '" + sCode + "' and A.SALES_DATE >= '" + start_date.Text + "' and A.SALES_DATE <= '" + end_date.Text + "' and A.ESCALATION_YN = 'N' "); }
private void btnSearch_Click(object sender, EventArgs e) { if (chk_all != null && chk_all.Checked) { txt_item_cd.Text = ""; txt_item_nm.Text = ""; txt_chugjong_nm.Text = ""; txt_class_nm.Text = ""; txt_country_nm.Text = ""; txt_type_nm.Text = ""; txt_hamyang.Text = ""; txt_label_nm.Text = ""; txt_balstock.Text = ""; txt_srch.Text = ""; txt_srch2.Text = ""; txt_grade1.Text = ""; txt_grade2.Text = ""; txt_grade3.Text = ""; in_grid_logic(); } else { if (txt_srch2.Text == null || txt_srch2.Text.Equals("")) { MessageBox.Show("조회할 제품을 선택해주십시오"); return; } in_grid_logic(); calBalstock_logic(); in_grade_logic(); } wnGConstant wng = new wnGConstant(); wng.mergeCells(inputRmGrid, 3); }
private void btnSearch_Click(object sender, EventArgs e) { lblMsg.Visible = true; Application.DoEvents(); in_grid_logic(); //in_grade_logic(); calBalance_logic(); wnGConstant wng = new wnGConstant(); wng.mergeCells(inputRmGrid, 3); lblMsg.Visible = false; }
private void btnSearch_Click(object sender, EventArgs e) { if (txt_srch2.Text == null || txt_srch2.Text.Equals("")) { MessageBox.Show("거래처를 먼저 선택해주세요"); return; } in_grid_logic(); in_grade_logic(); calBalance_logic(); wnGConstant wng = new wnGConstant(); wng.mergeCells(inputRmGrid, 3); }
private void cmbDataBinding() { ComInfo comInfo = new ComInfo(); wnGConstant wConst = new wnGConstant(); string sqlQuery = ""; cmb_storage.ValueMember = "코드"; cmb_storage.DisplayMember = "명칭"; sqlQuery = comInfo.queryStorage(); wConst.ComboBox_Read_Blank(cmb_storage, sqlQuery); cmb_gubun.ValueMember = "코드"; cmb_gubun.DisplayMember = "명칭"; sqlQuery = comInfo.queryLCode("310"); wConst.ComboBox_Read_Blank(cmb_gubun, sqlQuery); }
private void pop계산서수금검색_Load(object sender, EventArgs e) { ComInfo.gridHeaderSet(GridRecord); start_date.Text = DateTime.Now.ToString().Substring(0, 8) + "01"; lbl_cust_nm.Text = sName; ComInfo cominfo = new ComInfo(); wnGConstant wConst = new wnGConstant(); string sqlQuery = ""; rsTable.Columns.Add("수금일자"); rsTable.Columns.Add("번호"); rsTable.Columns.Add("수금액"); rsTable.Columns.Add("할인액"); rsTable.Columns.Add("합계금액"); rsTable.Columns.Add("비고"); rsTable.Columns.Add("구분"); bindData("where A.CUST_CD = '" + sCode + "' and A.SOO_DATE >= '" + start_date.Text + "' and A.SOO_DATE <= '" + end_date.Text + "' "); }
public void Srch_by_LotNo(string LotNo) { try { // 생산 & 지시정보 + 지시 원료육 wnDm wDm = new wnDm(); DataTable dt = wDm.fn_flow_trace_list_info_By_Lot(LotNo); if (dt != null && dt.Rows.Count > 0) { inputTraceGrid.Rows.Clear(); txt_input_date.Text = dt.Rows[0]["INPUT_DATE"].ToString(); txt_input_cd.Text = dt.Rows[0]["INPUT_CD"].ToString(); txt_lot_number.Text = dt.Rows[0]["LOT_NO"].ToString(); txt_work_date.Text = dt.Rows[0]["W_INST_DATE"].ToString(); txt_work_cd.Text = dt.Rows[0]["W_INST_CD"].ToString(); end_req_date.Text = dt.Rows[0]["DELIVERY_DATE"].ToString(); txt_inst_notice.Text = dt.Rows[0]["INST_NOTICE"].ToString(); if (dt.Rows[0]["COMPLETE_YN"].ToString().Equals("Y")) { txt_complete_yn.Text = "완료"; } else { txt_complete_yn.Text = "미완료"; } //TRACE GRID dt = wDm.fn_flow_trace_list_By_LotNo(LotNo); if (dt != null && dt.Rows.Count > 0) { inputTraceGrid.RowCount = dt.Rows.Count; for (int i = 0; i < dt.Rows.Count; i++) { inputTraceGrid.Rows[i].Cells["GUBUN"].Value = dt.Rows[i]["GUBUN"].ToString(); inputTraceGrid.Rows[i].Cells["INPUT_DATE"].Value = dt.Rows[i]["INPUT_DATE"].ToString(); inputTraceGrid.Rows[i].Cells["INPUT_CD"].Value = dt.Rows[i]["INPUT_CD"].ToString(); inputTraceGrid.Rows[i].Cells["INPUT_SEQ"].Value = dt.Rows[i]["INPUT_SEQ"].ToString(); inputTraceGrid.Rows[i].Cells["CUST_NM"].Value = dt.Rows[i]["CUST_NM"].ToString(); inputTraceGrid.Rows[i].Cells["RAW_MAT_NM"].Value = dt.Rows[i]["RAW_MAT_NM"].ToString(); inputTraceGrid.Rows[i].Cells["SPEC"].Value = dt.Rows[i]["SPEC"].ToString(); inputTraceGrid.Rows[i].Cells["UNIT_NM"].Value = dt.Rows[i]["UNIT_NM"].ToString(); inputTraceGrid.Rows[i].Cells["INTIME"].Value = dt.Rows[i]["시각"].ToString(); inputTraceGrid.Rows[i].Cells["LOT_NO"].Value = dt.Rows[i]["LOT_NO"].ToString(); inputTraceGrid.Rows[i].Cells["LOT_SUB"].Value = dt.Rows[i]["LOT_SUB"].ToString(); if (dt.Rows[i]["TOTAL_AMT"].ToString().Contains("/")) { string[] sTemp = dt.Rows[i]["TOTAL_AMT"].ToString().Split('/'); string sTemp2 = decimal.Parse(sTemp[0]).ToString("#,0.######"); sTemp2 += " / " + decimal.Parse(sTemp[1]).ToString("#,0.######"); inputTraceGrid.Rows[i].Cells["TOTAL_AMT"].Value = sTemp2; } else if (dt.Rows[i]["TOTAL_AMT"].ToString().Contains("x")) { string[] sTemp = dt.Rows[i]["TOTAL_AMT"].ToString().Split('x'); string sTemp2 = decimal.Parse(sTemp[0]).ToString("#,0.######"); string[] sTemp3 = sTemp[1].Split('='); sTemp2 += " x " + decimal.Parse(sTemp3[0]).ToString("#,0.######"); sTemp2 += " = " + decimal.Parse(sTemp3[1]).ToString("#,0.######"); inputTraceGrid.Rows[i].Cells["TOTAL_AMT"].Value = sTemp2; } else { inputTraceGrid.Rows[i].Cells["TOTAL_AMT"].Value = decimal.Parse(dt.Rows[i]["TOTAL_AMT"].ToString()).ToString("#,0.######"); } if (dt.Rows[i]["LOSS_AMT"] == null || dt.Rows[i]["LOSS_AMT"].ToString().Equals("")) { inputTraceGrid.Rows[i].Cells["LOSS_AMT"].Value = ""; } else { inputTraceGrid.Rows[i].Cells["LOSS_AMT"].Value = decimal.Parse(dt.Rows[i]["LOSS_AMT"].ToString()).ToString("#,0.######"); if (inputTraceGrid.Rows[i].Cells["LOSS_AMT"].Value.Equals("0")) { inputTraceGrid.Rows[i].Cells["LOSS_AMT"].Value = ""; } } if (dt.Rows[i]["POOR"] == null || dt.Rows[i]["POOR"].ToString().Equals("")) { inputTraceGrid.Rows[i].Cells["POOR_AMT"].Value = ""; } else { inputTraceGrid.Rows[i].Cells["POOR_AMT"].Value = decimal.Parse(dt.Rows[i]["POOR"].ToString()).ToString("#,0.######"); if (inputTraceGrid.Rows[i].Cells["POOR_AMT"].Value.Equals("0")) { inputTraceGrid.Rows[i].Cells["POOR_AMT"].Value = ""; } } if (inputTraceGrid.Rows[i].Cells[1].Value.ToString().Contains("음수")) { DataGridViewCellStyle style = new DataGridViewCellStyle(); style.BackColor = Color.IndianRed; style.SelectionBackColor = Color.DarkRed; style.ForeColor = Color.White; style.SelectionForeColor = Color.White; for (int j = 1; j < inputTraceGrid.ColumnCount; j++) { inputTraceGrid.Rows[i].Cells[j].Style = style; } } if (inputTraceGrid.Rows[i].Cells["CUST_NM"].Value.ToString().Contains("합계")) { inputTraceGrid.Rows[i].Cells["INTIME"].Value = ""; if (inputTraceGrid.Rows[i].Cells["CUST_NM"].Value.ToString().Contains("총")) { DataGridViewCellStyle style = new DataGridViewCellStyle(); style.BackColor = Color.Khaki; style.SelectionBackColor = Color.DarkKhaki; style.ForeColor = Color.Blue; for (int j = 5; j < inputTraceGrid.ColumnCount; j++) { inputTraceGrid.Rows[i].Cells[j].Style = style; } } else { DataGridViewCellStyle style = new DataGridViewCellStyle(); style.BackColor = Color.DarkTurquoise; style.SelectionBackColor = Color.DarkCyan; style.ForeColor = Color.Black; style.SelectionForeColor = Color.White; //style.BackColor = Color.DarkGray; //style.SelectionBackColor = Color.Gray; //style.ForeColor = Color.Black; //style.SelectionForeColor = Color.Black; for (int j = 5; j < inputTraceGrid.ColumnCount; j++) { inputTraceGrid.Rows[i].Cells[j].Style = style; } } } //if (dt.Rows[i]["INPUT_DATE"].ToString().Equals("===합계===")) //{ // DataGridViewCellStyle style = new DataGridViewCellStyle(); // style.BackColor = Color.Khaki; // style.SelectionBackColor = Color.DarkKhaki; // for (int j = 0; j < inputTraceGrid.ColumnCount; j++) // { // inputTraceGrid.Rows[i].Cells[j].Style = style; // } //} //if ((dt.Rows[i]["GUBUN"].ToString().Equals(s_GUBUN) || dt.Rows[i]["GUBUN"].ToString().Equals(s_GUBUN2)) // && dt.Rows[i]["INPUT_DATE"].ToString().Equals(s_INPUT_DATE) // && dt.Rows[i]["INPUT_CD"].ToString().Equals(s_INPUT_CD) // && dt.Rows[i]["INPUT_SEQ"].ToString().Equals(s_INPUT_SEQ)) //{ // txt_amt.Text = inputTraceGrid.Rows[i].Cells["TOTAL_AMT"].Value.ToString(); // txt_seq.Text = inputTraceGrid.Rows[i].Cells["INPUT_SEQ"].Value.ToString(); // txt_date.Text = inputTraceGrid.Rows[i].Cells["INPUT_DATE"].Value.ToString(); // txt_cd.Text = inputTraceGrid.Rows[i].Cells["INPUT_CD"].Value.ToString(); // txt_label_nm.Text = inputTraceGrid.Rows[i].Cells["LABEL_NM"].Value.ToString(); // lbl_amt.Text = inputTraceGrid.Rows[i].Cells["GUBUN"].Value.ToString() + "수량"; // lbl_date.Text = inputTraceGrid.Rows[i].Cells["GUBUN"].Value.ToString() + "일자"; // DataGridViewCellStyle style = new DataGridViewCellStyle(); // style.BackColor = Color.IndianRed; // style.SelectionBackColor = Color.DarkRed; // style.ForeColor = Color.White; // style.SelectionForeColor = Color.White; // for (int j = 3; j < inputTraceGrid.ColumnCount; j++) // { // inputTraceGrid.Rows[i].Cells[j].Style = style; // } //} //if (dt.Rows[i]["GUBUN"].ToString().Equals(txt_search_gubun.Text.ToString()) // && dt.Rows[i]["INPUT_DATE"].ToString().Equals(txt_search_date.Text.ToString()) // && dt.Rows[i]["INPUT_CD"].ToString().Equals(txt_search_cd.Text.ToString()) // && dt.Rows[i]["INPUT_SEQ"].ToString().Equals(txt_search_seq.Text.ToString())) //{ // txt_amt.Text = inputTraceGrid.Rows[i].Cells["TOTAL_AMT"].Value.ToString(); // txt_seq.Text = inputTraceGrid.Rows[i].Cells["INPUT_SEQ"].Value.ToString(); // txt_date.Text = inputTraceGrid.Rows[i].Cells["INPUT_DATE"].Value.ToString(); // txt_cd.Text = inputTraceGrid.Rows[i].Cells["INPUT_CD"].Value.ToString(); // txt_label_nm.Text = inputTraceGrid.Rows[i].Cells["LABEL_NM"].Value.ToString(); // lbl_amt.Text = inputTraceGrid.Rows[i].Cells["GUBUN"].Value.ToString() + "수량"; // lbl_date.Text = inputTraceGrid.Rows[i].Cells["GUBUN"].Value.ToString() + "일자"; // DataGridViewCellStyle style = new DataGridViewCellStyle(); // style.BackColor = Color.IndianRed; // style.SelectionBackColor = Color.DarkRed; // style.ForeColor = Color.White; // style.SelectionForeColor = Color.White; // for (int j = 3; j < inputTraceGrid.ColumnCount; j++) // { // inputTraceGrid.Rows[i].Cells[j].Style = style; // } //} } wnGConstant wng = new wnGConstant(); wng.mergeCells(inputTraceGrid, 3); } else { MessageBox.Show("조회중 오류가 발생하였습니다"); return; } } else { if (dt == null || dt.Rows.Count <= 0) { MessageBox.Show("입력된 LOT번호가 존재하지 않습니다."); ClearGrids(); return; } else { MessageBox.Show("하나 이상의 LOT번호가 검색됩니다. <오류> "); ClearGrids(); return; } } } catch (Exception ex) { MessageBox.Show("검색중 오류가 발생했습니다"); MessageBox.Show(ex.StackTrace); MessageBox.Show(ex + ""); Console.WriteLine(ex); Popup.pop오류리포트 msg = new Popup.pop오류리포트(ex.Message + " - " + ex.ToString()); msg.ShowDialog(); return; } }
private void in_grid_logic() { wnDm wDm = new wnDm(); DataTable dt = null; ArrayList locationSum = new ArrayList(); dt = wDm.fn_Cust_Info_List(start_date.Text, end_date.Text, chk_not_Zero.Checked, chk_not_Activity.Checked); if (dt != null && dt.Rows.Count > 0) { staffGrid.Rows.Clear(); staffGrid.RowCount = dt.Rows.Count; for (int i = 0; i < dt.Rows.Count; i++) { if (dt.Rows[i]["STAFF_NM"].ToString().ToString().Equals("--- 소계 ---") ) { locationSum.Add(i); DataGridViewCellStyle style = new DataGridViewCellStyle(); style.BackColor = Color.Khaki; style.SelectionBackColor = Color.DarkKhaki; for (int j = 0; j < staffGrid.ColumnCount; j++) { staffGrid.Rows[i].Cells[j].Style = style; } } else if (dt.Rows[i]["STAFF_NM"].ToString().ToString().Equals("=== 합계 ===") ) { DataGridViewCellStyle style = new DataGridViewCellStyle(); style.BackColor = Color.IndianRed; style.SelectionBackColor = Color.DarkRed; style.ForeColor = Color.White; style.SelectionForeColor = Color.White; for (int j = 0; j < staffGrid.ColumnCount; j++) { staffGrid.Rows[i].Cells[j].Style = style; } } staffGrid.Rows[i].Cells["사원번호"].Value = dt.Rows[i]["사원명칭"].ToString(); staffGrid.Rows[i].Cells["담당사원"].Value = dt.Rows[i]["STAFF_NM"].ToString(); staffGrid.Rows[i].Cells["코드"].Value = dt.Rows[i]["CUST_CD"].ToString(); staffGrid.Rows[i].Cells["거래처명"].Value = dt.Rows[i]["CUST_NM"].ToString(); staffGrid.Rows[i].Cells["이월잔고"].Value = decimal.Parse(dt.Rows[i]["이월잔고"].ToString()).ToString("#,0.######"); staffGrid.Rows[i].Cells["매출액"].Value = decimal.Parse(dt.Rows[i]["매출"].ToString()).ToString("#,0.######"); staffGrid.Rows[i].Cells["수금액"].Value = decimal.Parse(dt.Rows[i]["수금"].ToString()).ToString("#,0.######"); staffGrid.Rows[i].Cells["할인액"].Value = decimal.Parse(dt.Rows[i]["할인"].ToString()).ToString("#,0.######"); staffGrid.Rows[i].Cells["현잔고"].Value = decimal.Parse(dt.Rows[i]["현잔고"].ToString()).ToString("#,0.######"); staffGrid.Rows[i].Cells["매입액"].Value = decimal.Parse(dt.Rows[i]["매입"].ToString()).ToString("#,0.######"); staffGrid.Rows[i].Cells["이익금액"].Value = decimal.Parse(dt.Rows[i]["이익금"].ToString()).ToString("#,0.######"); staffGrid.Rows[i].Cells["이익율"].Value = decimal.Parse(dt.Rows[i]["이익율"].ToString()).ToString("#,0.##"); } } Cal_Balance_Logic(locationSum); if (chk_not_Activity.Checked) { for (int i = 0; i < staffGrid.Rows.Count; i++) { if (staffGrid.Rows[i].Cells["매출액"].Value.ToString().Equals("0") && staffGrid.Rows[i].Cells["수금액"].Value.ToString().Equals("0") && staffGrid.Rows[i].Cells["할인액"].Value.ToString().Equals("0")) { staffGrid.Rows.RemoveAt(i); i--; } } } if (chk_not_Zero.Checked) { for (int i = 0; i < staffGrid.Rows.Count; i++) { if (staffGrid.Rows[i].Cells["현잔고"].Value.ToString().Equals("0")) { staffGrid.Rows.RemoveAt(i); i--; } } } wnGConstant wng = new wnGConstant(); //wng.mergeCells(staffGrid, 2); }
public void Srch_by_LotNo(string LotNo) { try { // 생산 & 지시정보 + 지시 원료육 wnDm wDm = new wnDm(); DataTable dt = wDm.fn_flow_trace_list_info_By_Lot(LotNo); if (dt != null && dt.Rows.Count == 1) { inputTraceGrid.Rows.Clear(); txt_input_date.Text = dt.Rows[0]["INPUT_DATE"].ToString(); txt_input_cd.Text = dt.Rows[0]["INPUT_CD"].ToString(); txt_lot_number.Text = dt.Rows[0]["LOT_NO"].ToString(); txt_work_date.Text = dt.Rows[0]["W_INST_DATE"].ToString(); txt_work_cd.Text = dt.Rows[0]["W_INST_CD"].ToString(); end_req_date.Text = dt.Rows[0]["DELIVERY_DATE"].ToString(); txt_inst_notice.Text = dt.Rows[0]["INST_NOTICE"].ToString(); if (dt.Rows[0]["COMPLETE_YN"].ToString().Equals("3")) { txt_complete_yn.Text = "완료"; } else if (dt.Rows[0]["INPUT_DATE"].ToString().Equals("2")) { txt_complete_yn.Text = "진행중"; } else { txt_complete_yn.Text = "대기"; } //TRACE GRID dt = wDm.fn_flow_trace_list_By_LotNo(LotNo); if (dt != null && dt.Rows.Count > 0) { inputTraceGrid.RowCount = dt.Rows.Count; for (int i = 0; i < dt.Rows.Count; i++) { inputTraceGrid.Rows[i].Cells["GUBUN"].Value = dt.Rows[i]["GUBUN"].ToString(); inputTraceGrid.Rows[i].Cells["INPUT_DATE"].Value = dt.Rows[i]["INPUT_DATE"].ToString(); inputTraceGrid.Rows[i].Cells["INPUT_CD"].Value = dt.Rows[i]["INPUT_CD"].ToString(); inputTraceGrid.Rows[i].Cells["INPUT_SEQ"].Value = dt.Rows[i]["INPUT_SEQ"].ToString(); inputTraceGrid.Rows[i].Cells["CUST_NM"].Value = dt.Rows[i]["CUST_NM"].ToString(); inputTraceGrid.Rows[i].Cells["RAW_MAT_NM"].Value = dt.Rows[i]["RAW_MAT_NM"].ToString(); inputTraceGrid.Rows[i].Cells["LABEL_NM"].Value = dt.Rows[i]["LABEL_NM"].ToString(); inputTraceGrid.Rows[i].Cells["CHUGJONG_NM"].Value = dt.Rows[i]["CHUGJONG_NM"].ToString(); inputTraceGrid.Rows[i].Cells["COUNTRY_NM"].Value = dt.Rows[i]["COUNTRY_NM"].ToString(); inputTraceGrid.Rows[i].Cells["CLASS_NM"].Value = dt.Rows[i]["CLASS_NM"].ToString(); inputTraceGrid.Rows[i].Cells["GRADE_NM"].Value = dt.Rows[i]["GRADE_NM"].ToString(); inputTraceGrid.Rows[i].Cells["EXPRT_DATE"].Value = dt.Rows[i]["EXPRT_DATE"].ToString(); inputTraceGrid.Rows[i].Cells["FROZEN_GUBUN"].Value = dt.Rows[i]["FROZEN_GUBUN"].ToString(); inputTraceGrid.Rows[i].Cells["UNION_CD"].Value = dt.Rows[i]["UNION_CD"].ToString(); inputTraceGrid.Rows[i].Cells["A_UNION_CD"].Value = dt.Rows[i]["A_UNION_CD"].ToString(); inputTraceGrid.Rows[i].Cells["UNIT_NM"].Value = dt.Rows[i]["UNIT_NM"].ToString(); if (dt.Rows[i]["TOTAL_AMT"].ToString().Contains("/")) { string[] sTemp = dt.Rows[i]["TOTAL_AMT"].ToString().Split('/'); string sTemp2 = decimal.Parse(sTemp[0]).ToString("#,0.######"); sTemp2 += "/" + decimal.Parse(sTemp[1]).ToString("#,0.######"); inputTraceGrid.Rows[i].Cells["TOTAL_AMT"].Value = sTemp2; } else { inputTraceGrid.Rows[i].Cells["TOTAL_AMT"].Value = decimal.Parse(dt.Rows[i]["TOTAL_AMT"].ToString()).ToString("#,0.######"); } inputTraceGrid.Rows[i].Cells["LOSS_AMT"].Value = decimal.Parse(dt.Rows[i]["LOSS_AMT"].ToString()).ToString("#,0.######"); if (inputTraceGrid.Rows[i].Cells["LOSS_AMT"].Value.Equals("0")) { inputTraceGrid.Rows[i].Cells["LOSS_AMT"].Value = ""; } if (dt.Rows[i]["INPUT_DATE"].ToString().Equals("===합계===")) { DataGridViewCellStyle style = new DataGridViewCellStyle(); style.BackColor = Color.Khaki; style.SelectionBackColor = Color.DarkKhaki; for (int j = 0; j < inputTraceGrid.ColumnCount; j++) { inputTraceGrid.Rows[i].Cells[j].Style = style; } } if ((dt.Rows[i]["GUBUN"].ToString().Equals(s_GUBUN) || dt.Rows[i]["GUBUN"].ToString().Equals(s_GUBUN2)) && dt.Rows[i]["INPUT_DATE"].ToString().Equals(s_INPUT_DATE) && dt.Rows[i]["INPUT_CD"].ToString().Equals(s_INPUT_CD) && dt.Rows[i]["INPUT_SEQ"].ToString().Equals(s_INPUT_SEQ)) { txt_amt.Text = inputTraceGrid.Rows[i].Cells["TOTAL_AMT"].Value.ToString(); txt_seq.Text = inputTraceGrid.Rows[i].Cells["INPUT_SEQ"].Value.ToString(); txt_date.Text = inputTraceGrid.Rows[i].Cells["INPUT_DATE"].Value.ToString(); txt_cd.Text = inputTraceGrid.Rows[i].Cells["INPUT_CD"].Value.ToString(); txt_label_nm.Text = inputTraceGrid.Rows[i].Cells["LABEL_NM"].Value.ToString(); lbl_amt.Text = inputTraceGrid.Rows[i].Cells["GUBUN"].Value.ToString() + "수량"; lbl_date.Text = inputTraceGrid.Rows[i].Cells["GUBUN"].Value.ToString() + "일자"; DataGridViewCellStyle style = new DataGridViewCellStyle(); style.BackColor = Color.Firebrick; style.SelectionBackColor = Color.DarkRed; style.ForeColor = Color.White; style.SelectionForeColor = Color.White; for (int j = 3; j < inputTraceGrid.ColumnCount; j++) { inputTraceGrid.Rows[i].Cells[j].Style = style; } } } wnGConstant wng = new wnGConstant(); wng.mergeCells(inputTraceGrid, 3); } else { MessageBox.Show("조회중 오류가 발생하였습니다"); return; } } else { if (dt == null || dt.Rows.Count <= 0) { MessageBox.Show("입력된 LOT번호가 존재하지 않습니다. 재확인 부탁드립니다."); ClearGrids(); return; } else { MessageBox.Show("하나 이상의 LOT번호가 검색됩니다. 개발자에게 문의하세요 01044314551 "); ClearGrids(); return; } } //// 소비원부자재 //dt = wDm.fn_flow_trace_list_Sobi_By_Lot(LotNo); //if (dt != null && dt.Rows.Count > 0) //{ // //inputSobiGrid.Rows.Clear(); // //inputSobiGrid.RowCount = dt.Rows.Count; // //for (int i = 0; i < dt.Rows.Count; i++) // //{ // // inputSobiGrid.Rows[i].Cells["SO_INPUT_DATE"].Value = dt.Rows[i]["INPUT_DATE"].ToString(); // // inputSobiGrid.Rows[i].Cells["SO_INPUT_CD"].Value = dt.Rows[i]["INPUT_CD"].ToString(); // // inputSobiGrid.Rows[i].Cells["SO_INPUT_SEQ"].Value = dt.Rows[i]["SEQ"].ToString(); // // inputSobiGrid.Rows[i].Cells["SO_RAW_MAT_NM"].Value = dt.Rows[i]["RAW_MAT_NM"].ToString(); // // inputSobiGrid.Rows[i].Cells["SO_LABEL_NM"].Value = dt.Rows[i]["LABEL_NM"].ToString(); // // inputSobiGrid.Rows[i].Cells["SO_EXPRT_DATE"].Value = dt.Rows[i]["EXPRT_DATE"].ToString(); // // inputSobiGrid.Rows[i].Cells["SO_UNION_CD"].Value = dt.Rows[i]["UNION_CD"].ToString(); // // inputSobiGrid.Rows[i].Cells["SO_TOTAL_AMT"].Value = decimal.Parse(dt.Rows[i]["OUTPUT_AMT"].ToString()).ToString("#,0.######"); // // inputSobiGrid.Rows[i].Cells["SO_LOSS_AMT"].Value = decimal.Parse(dt.Rows[i]["LOSS_AMT"].ToString()).ToString("#,0.######"); // // inputSobiGrid.Rows[i].Cells["SO_UNIT_NM"].Value = dt.Rows[i]["UNIT_NM"].ToString(); // //} //} //else //{ // MessageBox.Show("입력된 LOT번호가 존재하지 않습니다. 재확인 부탁드립니다."); // ClearGrids(); // return; //} //// 생산제품 //dt = wDm.fn_flow_trace_list_Item_By_Lot(LotNo); //if (dt != null && dt.Rows.Count > 0) //{ // //inputItemGrid.Rows.Clear(); // //inputItemGrid.RowCount = dt.Rows.Count; // //for (int i = 0; i < dt.Rows.Count; i++) // //{ // // inputItemGrid.Rows[i].Cells["IT_INPUT_DATE"].Value = dt.Rows[i]["INPUT_DATE"].ToString(); // // inputItemGrid.Rows[i].Cells["IT_INPUT_CD"].Value = dt.Rows[i]["INPUT_CD"].ToString(); // // inputItemGrid.Rows[i].Cells["IT_LABEL_NM"].Value = dt.Rows[i]["LABEL_NM"].ToString(); // // inputItemGrid.Rows[i].Cells["IT_EXPRT_DATE"].Value = dt.Rows[i]["EXPRT_DATE"].ToString(); // // inputItemGrid.Rows[i].Cells["IT_FROZEN_GUBUN"].Value = dt.Rows[i]["FROZEN_GUBUN"].ToString(); // // inputItemGrid.Rows[i].Cells["IT_UNION_CD"].Value = dt.Rows[i]["A_UNION_CD"].ToString(); // // inputItemGrid.Rows[i].Cells["IT_TOTAL_AMT"].Value = decimal.Parse(dt.Rows[i]["INPUT_AMT"].ToString()).ToString("#,0.######"); // // inputItemGrid.Rows[i].Cells["IT_UNIT_NM"].Value = dt.Rows[i]["UNIT_NM"].ToString(); // //} //} //else //{ // MessageBox.Show("입력된 LOT번호가 존재하지 않습니다. 재확인 부탁드립니다."); // ClearGrids(); // return; //} //// 납품내역 //dt = wDm.fn_flow_trace_list_Sales_By_Lot(LotNo); //if (dt != null && dt.Rows.Count > 0) //{ // //inputSalesGrid.Rows.Clear(); // //inputSalesGrid.RowCount = dt.Rows.Count; // //for (int i = 0; i < dt.Rows.Count; i++) // //{ // // inputSalesGrid.Rows[i].Cells["SA_INPUT_DATE"].Value = dt.Rows[i]["SALES_DATE"].ToString(); // // inputSalesGrid.Rows[i].Cells["SA_INPUT_CD"].Value = dt.Rows[i]["SALES_CD"].ToString(); // // inputSalesGrid.Rows[i].Cells["SA_CUST_NM"].Value = dt.Rows[i]["CUST_NM"].ToString(); // // inputSalesGrid.Rows[i].Cells["SA_LABEL_NM"].Value = dt.Rows[i]["LABEL_NM"].ToString(); // // inputSalesGrid.Rows[i].Cells["SA_EXPRT_DATE"].Value = dt.Rows[i]["EXPRT_DATE"].ToString(); // // inputSalesGrid.Rows[i].Cells["SA_FROZEN_GUBUN"].Value = dt.Rows[i]["FROZEN_GUBUN"].ToString(); // // inputSalesGrid.Rows[i].Cells["SA_UNION_CD"].Value = dt.Rows[i]["A_UNION_CD"].ToString(); // // inputSalesGrid.Rows[i].Cells["SA_TOTAL_AMT"].Value = decimal.Parse(dt.Rows[i]["TOTAL_AMT"].ToString()).ToString("#,0.######"); // // inputSalesGrid.Rows[i].Cells["SA_UNIT_NM"].Value = dt.Rows[i]["UNIT_NM"].ToString(); // //} //} //else //{ // MessageBox.Show("입력된 LOT번호가 존재하지 않습니다. 재확인 부탁드립니다."); // ClearGrids(); // return; //} } catch (Exception ex) { MessageBox.Show("검색중 오류가 발생했습니다"); Console.WriteLine(ex); return; } }
private void bindData() { this.GridRecord.DataSource = null; this.GridRecord.RowCount = 0; this.adoPrt_1 = new DataTable(); try { wnDm wdm = new wnDm(); DataTable dt = null; dt = wdm.fn_활동보고서_매출처별_List(this.dtpDate.Text); this.adoPrt_1 = dt.Copy(); if ((dt == null ? true : dt.Rows.Count <= 0)) { this.GridRecord.RowCount = 1; } else { this.GridRecord.RowCount = dt.Rows.Count; for (int i = 0; i < dt.Rows.Count; i++) { this.GridRecord.Rows[i].Cells["C_SALES_DATE"].Value = dt.Rows[i]["일자명칭"].ToString(); if (dt.Rows[i]["일자명칭"].ToString().Equals("=== 합계 ===")) { this.GridRecord.Rows[i].DefaultCellStyle.BackColor = Color.Khaki; this.GridRecord.Rows[i].Cells["C_CUST_NM"].Value = "-"; this.GridRecord.Rows[i].Cells["C_PRODUCT_GUBUN"].Value = "-"; this.GridRecord.Rows[i].Cells["C_PRODUCT_NM"].Value = "-"; this.GridRecord.Rows[i].Cells["C_TAX_NM"].Value = "-"; this.GridRecord.Rows[i].Cells["C_VAT_NM"].Value = "-"; this.GridRecord.Rows[i].Cells["C_UNION_CD"].Value = "-"; this.GridRecord.Rows[i].Cells["C_SUPPLY_MONEY"].Value = decimal.Parse(dt.Rows[i]["SUPPLY_MONEY"].ToString()).ToString("#,0.######");; this.GridRecord.Rows[i].Cells["C_TAX_MONEY"].Value = decimal.Parse(dt.Rows[i]["TAX_MONEY"].ToString()).ToString("#,0.######");; this.GridRecord.Rows[i].Cells["C_TOTAL_MONEY"].Value = decimal.Parse(dt.Rows[i]["TOTAL_MONEY"].ToString()).ToString("#,0.######");; this.GridRecord.Rows[i].Cells["C_SALES_MONEY"].Value = decimal.Parse(dt.Rows[i]["SALES_MONEY"].ToString()).ToString("#,0.######"); this.GridRecord.Rows[i].Cells["C_SOO_MONEY"].Value = decimal.Parse(dt.Rows[i]["SOO_MONEY"].ToString()).ToString("#,0.######"); this.GridRecord.Rows[i].Cells["C_DC_MONEY"].Value = decimal.Parse(dt.Rows[i]["DC_MONEY"].ToString()).ToString("#,0.######"); this.GridRecord.Rows[i].Cells["C_BALANCE"].Value = decimal.Parse(dt.Rows[i]["BALANCE"].ToString()).ToString("#,0.######"); return; } this.GridRecord.Rows[i].Cells["C_CUST_NM"].Value = dt.Rows[i]["CUST_NM"].ToString(); this.GridRecord.Rows[i].Cells["C_PRODUCT_GUBUN"].Value = dt.Rows[i]["INPUT_GUBUN"].ToString(); this.GridRecord.Rows[i].Cells["C_PRODUCT_NM"].Value = dt.Rows[i]["PRODUCT_NM"].ToString(); this.GridRecord.Rows[i].Cells["C_TAX_NM"].Value = dt.Rows[i]["TAX_NM"].ToString(); this.GridRecord.Rows[i].Cells["C_VAT_NM"].Value = dt.Rows[i]["VAT_NM"].ToString(); //this.GridRecord.Rows[i].Cells["C_UNION_CD"].Value = dt.Rows[i]["UNION_CD"].ToString(); this.GridRecord.Rows[i].Cells["C_SUPPLY_MONEY"].Value = decimal.Parse(dt.Rows[i]["SUPPLY_MONEY"].ToString()).ToString("#,0.######");; this.GridRecord.Rows[i].Cells["C_TAX_MONEY"].Value = decimal.Parse(dt.Rows[i]["TAX_MONEY"].ToString()).ToString("#,0.######");; this.GridRecord.Rows[i].Cells["C_TOTAL_MONEY"].Value = decimal.Parse(dt.Rows[i]["TOTAL_MONEY"].ToString()).ToString("#,0.######");; this.GridRecord.Rows[i].Cells["C_SALES_MONEY"].Value = decimal.Parse(dt.Rows[i]["SALES_MONEY"].ToString()).ToString("#,0.######"); this.GridRecord.Rows[i].Cells["C_SOO_MONEY"].Value = decimal.Parse(dt.Rows[i]["SOO_MONEY"].ToString()).ToString("#,0.######"); this.GridRecord.Rows[i].Cells["C_DC_MONEY"].Value = decimal.Parse(dt.Rows[i]["DC_MONEY"].ToString()).ToString("#,0.######"); this.GridRecord.Rows[i].Cells["C_BALANCE"].Value = decimal.Parse(dt.Rows[i]["BALANCE"].ToString()).ToString("#,0.######"); } wnGConstant wng = new wnGConstant(); wng.mergeCells(GridRecord, 2); } } catch (Exception exception1) { Exception exception = exception1; wnLog.writeLog(100, string.Concat(exception.Message, " - ", exception.ToString())); Popup.pop오류리포트 msg = new Popup.pop오류리포트(exception1.Message + " - " + exception1.ToString()); msg.ShowDialog(); } }
private void bindData2() { this.GridRecord2.DataSource = null; this.GridRecord2.RowCount = 0; this.adoPrt_2 = new DataTable(); this.strDay_2 = this.dtpDate.Text; try { wdm = new wnDm(); wConst = new wnGConstant(); DataTable dt = null; dt = wdm.fn_활동보고서_상품별(this.dtpDate.Text); //this.adoPrt_2 = dt.Copy(); if ((dt == null ? true : dt.Rows.Count <= 0)) { this.GridRecord2.RowCount = 1; } else { this.GridRecord2.RowCount = dt.Rows.Count; for (int i = 0; i < dt.Rows.Count; i++) { this.GridRecord2.Rows[i].Cells["P_PRODUCT_NM"].Value = dt.Rows[i]["제품명"].ToString(); if (dt.Rows[i]["제품명"].ToString().Equals("=== 합계 ===")) { GridRecord2.Rows[i].DefaultCellStyle.BackColor = Color.Khaki; this.GridRecord2.Rows[i].Cells["P_PRODUCT_GUBUN"].Value = "-"; this.GridRecord2.Rows[i].Cells["P_UNIT_NM"].Value = "-"; this.GridRecord2.Rows[i].Cells["P_PAST_AMT"].Value = "-"; this.GridRecord2.Rows[i].Cells["P_TODAY_INPUT"].Value = "-"; this.GridRecord2.Rows[i].Cells["P_TODAY_OUTPUT"].Value = "-"; this.GridRecord2.Rows[i].Cells["P_TODAY_SALES"].Value = "-"; this.GridRecord2.Rows[i].Cells["P_TODAY_SALES_BACK"].Value = "-"; this.GridRecord2.Rows[i].Cells["P_CURR_AMT"].Value = "-"; this.GridRecord2.Rows[i].Cells["P_SUPPLY_MONEY"].Value = decimal.Parse(dt.Rows[i]["공급가"].ToString()).ToString("#,0.######"); this.GridRecord2.Rows[i].Cells["P_TAX_MONEY"].Value = decimal.Parse(dt.Rows[i]["부가세"].ToString()).ToString("#,0.######"); this.GridRecord2.Rows[i].Cells["P_TOTAL_MONEY"].Value = decimal.Parse(dt.Rows[i]["합계액"].ToString()).ToString("#,0.######"); return; } if (dt.Rows[i]["구분"].ToString().Equals("1")) { this.GridRecord2.Rows[i].Cells["P_PRODUCT_GUBUN"].Value = "상품"; } else { this.GridRecord2.Rows[i].Cells["P_PRODUCT_GUBUN"].Value = "제품"; } this.GridRecord2.Rows[i].Cells["P_UNIT_NM"].Value = dt.Rows[i]["단위"].ToString(); this.GridRecord2.Rows[i].Cells["P_PAST_AMT"].Value = decimal.Parse(dt.Rows[i]["당일재고량"].ToString()).ToString("#,0.######"); this.GridRecord2.Rows[i].Cells["P_TODAY_INPUT"].Value = decimal.Parse(dt.Rows[i]["입고량"].ToString()).ToString("#,0.######"); // this.GridRecord2.Rows[i].Cells["P_TODAY_OUTPUT"].Value = decimal.Parse(dt.Rows[i]["출고량"].ToString()).ToString("#,0.######"); this.GridRecord2.Rows[i].Cells["P_TODAY_SALES"].Value = decimal.Parse(dt.Rows[i]["생산출고량"].ToString()).ToString("#,0.######"); // this.GridRecord2.Rows[i].Cells["P_TODAY_SALES_BACK"].Value = decimal.Parse(dt.Rows[i]["반품량"].ToString()).ToString("#,0.######"); this.GridRecord2.Rows[i].Cells["P_CURR_AMT"].Value = decimal.Parse(dt.Rows[i]["현재고"].ToString()).ToString("#,0.######"); this.GridRecord2.Rows[i].Cells["P_SUPPLY_MONEY"].Value = decimal.Parse(dt.Rows[i]["공급가"].ToString()).ToString("#,0.######"); this.GridRecord2.Rows[i].Cells["P_TAX_MONEY"].Value = decimal.Parse(dt.Rows[i]["부가세"].ToString()).ToString("#,0.######"); this.GridRecord2.Rows[i].Cells["P_TOTAL_MONEY"].Value = decimal.Parse(dt.Rows[i]["합계액"].ToString()).ToString("#,0.######"); } } } catch (Exception exception1) { Exception exception = exception1; wnLog.writeLog(100, string.Concat(exception.Message, " - ", exception.ToString())); Popup.pop오류리포트 msg = new Popup.pop오류리포트(exception1.Message + " - " + exception1.ToString()); msg.ShowDialog(); } }
public void Srch_List() { try { // 생산 & 지시정보 + 지시 원료육 wnDm wDm = new wnDm(); DataTable dt = new DataTable(); inputTraceGrid.Rows.Clear(); StringBuilder sb = new StringBuilder(); sb.AppendLine(" WHERE 1=1 "); sb.AppendLine(SrchValue); dt = wDm.fn_sales_trace_list(sb.ToString()); if (dt != null && dt.Rows.Count > 0) { inputTraceGrid.RowCount = dt.Rows.Count; for (int i = 0; i < dt.Rows.Count; i++) { inputTraceGrid.Rows[i].Cells["GUBUN"].Value = dt.Rows[i]["GUBUN"].ToString(); inputTraceGrid.Rows[i].Cells["INPUT_DATE"].Value = dt.Rows[i]["INPUT_DATE"].ToString(); inputTraceGrid.Rows[i].Cells["INPUT_CD"].Value = dt.Rows[i]["INPUT_CD"].ToString(); inputTraceGrid.Rows[i].Cells["INPUT_SEQ"].Value = dt.Rows[i]["INPUT_SEQ"].ToString(); inputTraceGrid.Rows[i].Cells["CUST_NM"].Value = dt.Rows[i]["CUST_NM"].ToString(); inputTraceGrid.Rows[i].Cells["RAW_MAT_NM"].Value = dt.Rows[i]["RAW_MAT_NM"].ToString(); inputTraceGrid.Rows[i].Cells["LABEL_NM"].Value = dt.Rows[i]["LABEL_NM"].ToString(); inputTraceGrid.Rows[i].Cells["EXPRT_DATE"].Value = dt.Rows[i]["EXPRT_DATE"].ToString(); inputTraceGrid.Rows[i].Cells["FROZEN_GUBUN"].Value = dt.Rows[i]["FROZEN_GUBUN"].ToString(); inputTraceGrid.Rows[i].Cells["A_UNION_CD"].Value = dt.Rows[i]["A_UNION_CD"].ToString(); inputTraceGrid.Rows[i].Cells["UNIT_NM"].Value = dt.Rows[i]["UNIT_NM"].ToString(); inputTraceGrid.Rows[i].Cells["TOTAL_AMT"].Value = decimal.Parse(dt.Rows[i]["TOTAL_AMT"].ToString()).ToString("#,0.######"); inputTraceGrid.Rows[i].Cells["TOTAL_PRICE"].Value = decimal.Parse(dt.Rows[i]["TOTAL_PRICE"].ToString()).ToString("#,0.######"); inputTraceGrid.Rows[i].Cells["TOTAL_SUPPLY_MONEY"].Value = decimal.Parse(dt.Rows[i]["TOTAL_SUPPLY_MONEY"].ToString()).ToString("#,0.######"); inputTraceGrid.Rows[i].Cells["TOTAL_TAX_MONEY"].Value = decimal.Parse(dt.Rows[i]["TOTAL_TAX_MONEY"].ToString()).ToString("#,0.######"); inputTraceGrid.Rows[i].Cells["TOTAL_MONEY"].Value = decimal.Parse(dt.Rows[i]["TOTAL_MONEY"].ToString()).ToString("#,0.######"); if ((dt.Rows[i]["GUBUN"].ToString().Equals(s_GUBUN) || dt.Rows[i]["GUBUN"].ToString().Equals(s_GUBUN2)) && dt.Rows[i]["INPUT_DATE"].ToString().Equals(s_INPUT_DATE) && dt.Rows[i]["INPUT_CD"].ToString().Equals(s_INPUT_CD) && dt.Rows[i]["INPUT_SEQ"].ToString().Equals(s_INPUT_SEQ)) { txt_amt.Text = inputTraceGrid.Rows[i].Cells["TOTAL_AMT"].Value.ToString(); txt_seq.Text = inputTraceGrid.Rows[i].Cells["INPUT_SEQ"].Value.ToString(); txt_date.Text = inputTraceGrid.Rows[i].Cells["INPUT_DATE"].Value.ToString(); txt_cd.Text = inputTraceGrid.Rows[i].Cells["INPUT_CD"].Value.ToString(); txt_label_nm.Text = inputTraceGrid.Rows[i].Cells["LABEL_NM"].Value.ToString(); txt_supply.Text = inputTraceGrid.Rows[i].Cells["TOTAL_SUPPLY_MONEY"].Value.ToString(); txt_tax.Text = inputTraceGrid.Rows[i].Cells["TOTAL_TAX_MONEY"].Value.ToString(); txt_money.Text = inputTraceGrid.Rows[i].Cells["TOTAL_MONEY"].Value.ToString(); txt_cust_nm.Text = inputTraceGrid.Rows[i].Cells["CUST_NM"].Value.ToString(); lbl_amt.Text = inputTraceGrid.Rows[i].Cells["GUBUN"].Value.ToString() + "수량"; lbl_date.Text = inputTraceGrid.Rows[i].Cells["GUBUN"].Value.ToString() + "일자"; DataGridViewCellStyle style = new DataGridViewCellStyle(); style.BackColor = Color.Firebrick; style.SelectionBackColor = Color.DarkRed; style.ForeColor = Color.White; style.SelectionForeColor = Color.White; for (int j = 3; j < inputTraceGrid.ColumnCount; j++) { inputTraceGrid.Rows[i].Cells[j].Style = style; } } } wnGConstant wng = new wnGConstant(); wng.mergeCells(inputTraceGrid, 3); } else { MessageBox.Show("납품 내역이 없거나 검색값이 잘못되었습니다."); txt_rBtn_value.Text = ""; txt_srch_value.Text = ""; return; } //// 소비원부자재 //dt = wDm.fn_flow_trace_list_Sobi_By_Lot(LotNo); //if (dt != null && dt.Rows.Count > 0) //{ // //inputSobiGrid.Rows.Clear(); // //inputSobiGrid.RowCount = dt.Rows.Count; // //for (int i = 0; i < dt.Rows.Count; i++) // //{ // // inputSobiGrid.Rows[i].Cells["SO_INPUT_DATE"].Value = dt.Rows[i]["INPUT_DATE"].ToString(); // // inputSobiGrid.Rows[i].Cells["SO_INPUT_CD"].Value = dt.Rows[i]["INPUT_CD"].ToString(); // // inputSobiGrid.Rows[i].Cells["SO_INPUT_SEQ"].Value = dt.Rows[i]["SEQ"].ToString(); // // inputSobiGrid.Rows[i].Cells["SO_RAW_MAT_NM"].Value = dt.Rows[i]["RAW_MAT_NM"].ToString(); // // inputSobiGrid.Rows[i].Cells["SO_LABEL_NM"].Value = dt.Rows[i]["LABEL_NM"].ToString(); // // inputSobiGrid.Rows[i].Cells["SO_EXPRT_DATE"].Value = dt.Rows[i]["EXPRT_DATE"].ToString(); // // inputSobiGrid.Rows[i].Cells["SO_UNION_CD"].Value = dt.Rows[i]["UNION_CD"].ToString(); // // inputSobiGrid.Rows[i].Cells["SO_TOTAL_AMT"].Value = decimal.Parse(dt.Rows[i]["OUTPUT_AMT"].ToString()).ToString("#,0.######"); // // inputSobiGrid.Rows[i].Cells["SO_LOSS_AMT"].Value = decimal.Parse(dt.Rows[i]["LOSS_AMT"].ToString()).ToString("#,0.######"); // // inputSobiGrid.Rows[i].Cells["SO_UNIT_NM"].Value = dt.Rows[i]["UNIT_NM"].ToString(); // //} //} //else //{ // MessageBox.Show("입력된 LOT번호가 존재하지 않습니다. 재확인 부탁드립니다."); // ClearGrids(); // return; //} //// 생산제품 //dt = wDm.fn_flow_trace_list_Item_By_Lot(LotNo); //if (dt != null && dt.Rows.Count > 0) //{ // //inputItemGrid.Rows.Clear(); // //inputItemGrid.RowCount = dt.Rows.Count; // //for (int i = 0; i < dt.Rows.Count; i++) // //{ // // inputItemGrid.Rows[i].Cells["IT_INPUT_DATE"].Value = dt.Rows[i]["INPUT_DATE"].ToString(); // // inputItemGrid.Rows[i].Cells["IT_INPUT_CD"].Value = dt.Rows[i]["INPUT_CD"].ToString(); // // inputItemGrid.Rows[i].Cells["IT_LABEL_NM"].Value = dt.Rows[i]["LABEL_NM"].ToString(); // // inputItemGrid.Rows[i].Cells["IT_EXPRT_DATE"].Value = dt.Rows[i]["EXPRT_DATE"].ToString(); // // inputItemGrid.Rows[i].Cells["IT_FROZEN_GUBUN"].Value = dt.Rows[i]["FROZEN_GUBUN"].ToString(); // // inputItemGrid.Rows[i].Cells["IT_UNION_CD"].Value = dt.Rows[i]["A_UNION_CD"].ToString(); // // inputItemGrid.Rows[i].Cells["IT_TOTAL_AMT"].Value = decimal.Parse(dt.Rows[i]["INPUT_AMT"].ToString()).ToString("#,0.######"); // // inputItemGrid.Rows[i].Cells["IT_UNIT_NM"].Value = dt.Rows[i]["UNIT_NM"].ToString(); // //} //} //else //{ // MessageBox.Show("입력된 LOT번호가 존재하지 않습니다. 재확인 부탁드립니다."); // ClearGrids(); // return; //} //// 납품내역 //dt = wDm.fn_flow_trace_list_Sales_By_Lot(LotNo); //if (dt != null && dt.Rows.Count > 0) //{ // //inputSalesGrid.Rows.Clear(); // //inputSalesGrid.RowCount = dt.Rows.Count; // //for (int i = 0; i < dt.Rows.Count; i++) // //{ // // inputSalesGrid.Rows[i].Cells["SA_INPUT_DATE"].Value = dt.Rows[i]["SALES_DATE"].ToString(); // // inputSalesGrid.Rows[i].Cells["SA_INPUT_CD"].Value = dt.Rows[i]["SALES_CD"].ToString(); // // inputSalesGrid.Rows[i].Cells["SA_CUST_NM"].Value = dt.Rows[i]["CUST_NM"].ToString(); // // inputSalesGrid.Rows[i].Cells["SA_LABEL_NM"].Value = dt.Rows[i]["LABEL_NM"].ToString(); // // inputSalesGrid.Rows[i].Cells["SA_EXPRT_DATE"].Value = dt.Rows[i]["EXPRT_DATE"].ToString(); // // inputSalesGrid.Rows[i].Cells["SA_FROZEN_GUBUN"].Value = dt.Rows[i]["FROZEN_GUBUN"].ToString(); // // inputSalesGrid.Rows[i].Cells["SA_UNION_CD"].Value = dt.Rows[i]["A_UNION_CD"].ToString(); // // inputSalesGrid.Rows[i].Cells["SA_TOTAL_AMT"].Value = decimal.Parse(dt.Rows[i]["TOTAL_AMT"].ToString()).ToString("#,0.######"); // // inputSalesGrid.Rows[i].Cells["SA_UNIT_NM"].Value = dt.Rows[i]["UNIT_NM"].ToString(); // //} //} //else //{ // MessageBox.Show("입력된 LOT번호가 존재하지 않습니다. 재확인 부탁드립니다."); // ClearGrids(); // return; //} } catch (Exception ex) { MessageBox.Show("검색중 오류가 발생했습니다"); Console.WriteLine(ex); return; } }