Exemplo n.º 1
0
        public void Srch_by_union(string SrchValue)
        {
            try
            {
                wnDm      wDm = new wnDm();
                DataTable dt  = new DataTable();
                dt = wDm.fn_flow_trace_list_By_Union_cd(SrchValue);
                if (dt == null || dt.Rows.Count < 1)
                {
                    MessageBox.Show("검색된 개체번호가 없거나 생산공정이 실시되지 않았습니다.\n 재확인부탁드립니다.");
                    return;
                }
                else if (dt.Rows.Count > 1)
                {
                    Popup.pop_공정추적LOT정하기 reLot = new Popup.pop_공정추적LOT정하기();
                    reLot.dt            = wDm.fn_flow_trace_list_By_Union_cd_Detail(SrchValue);
                    reLot.lblTitle.Text = "원료육 생산 출고 내역";
                    reLot.GridRecord.Columns["INPUT_DATE"].HeaderText = "소비일자";
                    reLot.GridRecord.Columns["A_UNION_CD"].HeaderText = "개체번호";
                    reLot.GridRecord.Columns["INPUT_AMT"].HeaderText  = "소비량";
                    reLot.ShowDialog();
                    if (reLot.sLotNo != null && !reLot.sLotNo.Equals(""))
                    {
                        s_GUBUN      = "소비";
                        s_INPUT_DATE = reLot.sDate;
                        s_INPUT_CD   = reLot.sCd;
                        s_INPUT_SEQ  = reLot.sSeq;

                        txt_amt.Text      = reLot.sAmt;
                        txt_label_nm.Text = reLot.sLabel;
                        txt_date.Text     = reLot.sDate;
                        txt_cd.Text       = reLot.sCd;
                        txt_seq.Text      = reLot.sSeq;

                        Srch_by_LotNo(reLot.sLotNo);
                    }
                }
                else
                {
                    //1개 검색
                    Srch_by_LotNo(dt.Rows[0]["LOT_NO"].ToString());
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("검색중 오류 발생");
                Console.WriteLine(ex);
            }
        }
Exemplo n.º 2
0
        public void Srch_by_a_union(string SrchValue)
        {
            try
            {
                wnDm      wDm = new wnDm();
                DataTable dt  = new DataTable();
                dt = wDm.fn_flow_trace_list_By_A_Union_cd(SrchValue);
                if (dt == null || dt.Rows.Count < 1)
                {
                    MessageBox.Show("검색된 묶음번호가 없습니다. 재확인부탁드립니다.");
                    return;
                }
                else if (dt.Rows.Count > 1)
                {
                    Popup.pop_공정추적LOT정하기 reLot = new Popup.pop_공정추적LOT정하기();
                    reLot.dt = wDm.fn_flow_trace_list_By_A_Union_cd_Detail(SrchValue);
                    reLot.ShowDialog();
                    if (reLot.sLotNo != null && !reLot.sLotNo.Equals(""))
                    {
                        s_GUBUN      = "생산";
                        s_INPUT_DATE = reLot.sDate;
                        s_INPUT_CD   = reLot.sCd;
                        s_INPUT_SEQ  = reLot.sSeq;

                        txt_amt.Text      = reLot.sAmt;
                        txt_label_nm.Text = reLot.sLabel;
                        txt_date.Text     = reLot.sDate;
                        txt_cd.Text       = reLot.sCd;
                        txt_seq.Text      = reLot.sSeq;

                        Srch_by_LotNo(reLot.sLotNo);
                    }
                }
                else
                {
                    //1개 검색
                    Srch_by_LotNo(dt.Rows[0]["LOT_NO"].ToString());
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("검색중 오류 발생");
                Console.WriteLine(ex);
            }
        }