Exemplo n.º 1
0
        private bool Generate_Registration_SyukkoDetail(T_SyukkoDetail regSyukkoDetail)
        {
            // 出庫詳細情報の登録
            var errorMessage = _Sy.PostT_SyukkoDetail(regSyukkoDetail);

            if (errorMessage != string.Empty)
            {
                MessageBox.Show(errorMessage);
                return(false);
            }
            return(true);
        }
Exemplo n.º 2
0
        private bool SyukkoDetailUpdate(T_SyukkoDetail regSyukkoDetail)
        {
            var errorMessage = _Sy.PutSyukkoDetail(regSyukkoDetail);

            if (errorMessage != string.Empty)
            {
                MessageBox.Show(errorMessage);
                return(false);
            }
            txt_SyID.Focus();

            return(true);
        }
Exemplo n.º 3
0
        private bool Get_Syukko_Data_AtRegistration()
        {
            // 確定可否
            if (DialogResult.OK != MessageBox.Show(this, "確定してよろしいですか", "確定可否", MessageBoxButtons.OKCancel, MessageBoxIcon.Question))
            {
                return(false);
            }
            //注文情報を出庫テーブルに送る
            int id = int.Parse(txt_ChID.Text);

            using (SalesManagement_DevContext dbContext = new SalesManagement_DevContext())
            {
                var result = dbContext.T_Chumons
                             .Where(c => c.ChID == id).ToArray();
                foreach (var item in result)
                {
                    var regSyukko = new T_Syukko()
                    {
                        EmID        = null,
                        ClID        = item.ClID,
                        SoID        = item.SoID,
                        OrID        = item.OrID,
                        SyDate      = null,
                        SyStateFlag = 0,
                        SyFlag      = 0,
                        SyHidden    = ""
                    };
                    // 注文情報の登録
                    var errorMessage = _Sy.PostT_Syukko(regSyukko);

                    if (errorMessage != string.Empty)
                    {
                        MessageBox.Show(errorMessage);
                        return(false);
                    }
                }
                int id2      = int.Parse(txt_OrID.Text);
                var syresult = dbContext.T_Syukkos
                               .Where(s => s.OrID == id2)
                               .ToArray();
                foreach (var item in syresult)
                {
                    var regSyukkoDetail = new T_SyukkoDetail()
                    {
                        SyID       = item.SyID,
                        PrID       = int.Parse(txt_PrID.Text),
                        SyQuantity = int.Parse(txt_ChQuantity.Text)
                    };
                    // 注文情報の登録
                    var errorMessage = _Sy.PostT_SyukkoDetail(regSyukkoDetail);

                    if (errorMessage != string.Empty)
                    {
                        MessageBox.Show(errorMessage);
                        return(false);
                    }
                }
                foreach (var item in result)
                {
                    var regChumon = new T_Chumon()
                    {
                        ChID        = item.ChID,
                        SoID        = item.SoID,
                        EmID        = transfer_int,
                        ClID        = item.ClID,
                        OrID        = item.OrID,
                        ChDate      = DateTime.Now,
                        ChStateFlag = 1,
                        ChFlag      = item.ChFlag,
                        ChHidden    = item.ChHidden
                    };
                    // 注文情報の登録
                    var errorMessage = _Ch.PutChumon(regChumon);
                    if (errorMessage != string.Empty)
                    {
                        MessageBox.Show(errorMessage);
                        return(false);
                    }
                }
                //// 画面更新
                fncAllSelect();
                txt_ChID.Focus();
                return(true);
            }
        }