private void Form_Load(object sender, EventArgs e)
        {
            try
            {
                base.InProgramID = ProID;
                base.InProgramNM = ProNm;

                this.SetFunctionLabel(EProMode.PRINT);
                this.InitialControlArray();
                base.Btn_F10.Text = "";
                base.Btn_F11.Text = "";

                //起動時共通処理
                base.StartProgram();

                stbl = new ShiireTankaTeiseiIraisho_BL();
                string ymd = stbl.GetDate();
                CboStoreCD.Bind(ymd);

                ScOrder.Value1 = "1";

                SetFuncKeyAll(this, "100001000011");
                Scr_Clr(0);
            }
            catch (Exception ex)
            {
                //エラー時共通処理
                MessageBox.Show(ex.Message);
                EndSec();
            }
        }
        private void Form_Load(object sender, EventArgs e)
        {
            try
            {
                base.InProgramID = ProID;
                base.InProgramNM = ProNm;

                this.SetFunctionLabel(EProMode.PRINT);
                this.InitialControlArray();
                base.Btn_F9.Text  = "";
                base.Btn_F10.Text = "";
                base.Btn_F11.Text = "";

                //起動時共通処理
                base.StartProgram();

                mibl = new NyuusyukkinYoteiList_BL();
                CboStoreCD.Bind(string.Empty);

                SetFuncKeyAll(this, "100001000001");
                Scr_Clr(0);
            }
            catch (Exception ex)
            {
                //エラー時共通処理
                MessageBox.Show(ex.Message);
                EndSec();
            }
        }
        private void Form_Load(object sender, EventArgs e)
        {
            try
            {
                base.InProgramID = ProID;
                base.InProgramNM = ProNm;

                this.SetFunctionLabel(EProMode.SHOW);
                this.InitialControlArray();

                //起動時共通処理
                base.StartProgram();

                ssbl = new SeikyuuShoukai_BL();
                string ymd = ssbl.GetDate();
                CboStoreCD.Bind(ymd);

                //基準日:Form.請求締日	(未入力時はToday)得意先区分:2
                ScCustomer.Value1 = "2";

                SetFuncKeyAll(this, "100001000010");
                Scr_Clr(0);
            }
            catch (Exception ex)
            {
                //エラー時共通処理
                MessageBox.Show(ex.Message);
                EndSec();
            }
        }
        /// <summary>
        /// HEAD部のコードチェック
        /// </summary>
        /// <param name="index"></param>
        /// <param name="set">画面展開なしの場合:falesに設定する</param>
        /// <returns></returns>
        private bool CheckDetail(int index, bool set = true)
        {
            switch (index)
            {
            case (int)EIndex.StoreCD:
                if (CboStoreCD.SelectedValue.Equals("-1"))
                {
                    bbl.ShowMessage("E102");
                    CboStoreCD.Focus();
                    return(false);
                }
                else
                {
                    if (!base.CheckAvailableStores(CboStoreCD.SelectedValue.ToString()))
                    {
                        bbl.ShowMessage("E141");
                        CboStoreCD.Focus();
                        return(false);
                    }
                    ExecDisp();
                }

                break;
            }

            return(true);
        }
Ejemplo n.º 5
0
        private void Form_Load(object sender, EventArgs e)
        {
            try
            {
                base.InProgramID = ProID;
                base.InProgramNM = ProNm;

                this.SetFunctionLabel(EProMode.PRINT);
                this.InitialControlArray();
                base.Btn_F10.Text = "";

                //起動時共通処理
                base.StartProgram();

                //検索用のパラメータ設定
                string stores = GetAllAvailableStores();
                ScHacchuuNO.Value1 = InOperatorCD;
                ScHacchuuNO.Value2 = stores;

                hsbl = new Hacchuusho_BL();
                string ymd = bbl.GetDate();
                CboStoreCD.Bind(ymd, "2");

                SetFuncKeyAll(this, "100001000011");
                Scr_Clr(0);
            }
            catch (Exception ex)
            {
                //エラー時共通処理
                MessageBox.Show(ex.Message);
                EndSec();
            }
        }
        private void Form_Load(object sender, EventArgs e)
        {
            try
            {
                base.InProgramID = ProID;
                base.InProgramNM = ProNm;

                this.SetFunctionLabel(EProMode.PRINT);
                this.InitialControlArray();
                base.Btn_F10.Text = "";

                //起動時共通処理
                base.StartProgram();

                mibl = new  KaitouNoukiTouroku_BL();
                CboStoreCD.Bind(string.Empty);
                CboSoukoName.Bind(string.Empty);

                ScOrderCD.Value1 = "1";

                SetFuncKeyAll(this, "100001000011");
                Scr_Clr(0);
            }
            catch (Exception ex)
            {
                //エラー時共通処理
                MessageBox.Show(ex.Message);
                EndSec();
            }
        }
        private void Form_Load(object sender, EventArgs e)
        {
            try
            {
                base.InProgramID = ProID;
                base.InProgramNM = ProNm;

                this.SetFunctionLabel(EProMode.PRINT);
                this.InitialControlArray();
                base.Btn_F10.Text = "";

                //起動時共通処理
                base.StartProgram();

                //検索用のパラメータ設定
                string stores = GetAllAvailableStores();
                ScUriageNO.Value1 = InOperatorCD;
                ScUriageNO.Value2 = stores;
                ScCustomer.Value1 = "1";

                mibl = new TempoNouhinsyo_BL();
                CboStoreCD.Bind(string.Empty);


                SetFuncKeyAll(this, "100001000011");
                Scr_Clr(0);

                //コマンドライン引数を配列で取得する
                string[] cmds = System.Environment.GetCommandLineArgs();
                if (cmds.Length - 1 > (int)ECmdLine.PcID)
                {
                    detailControls[(int)EIndex.SalesNO].Text = cmds[(int)ECmdLine.PcID + 1];
                    StartUpKBN = cmds[cmds.Length - 1];

                    if (StartUpKBN == "1")
                    {
                        WindowState   = FormWindowState.Minimized;
                        ShowInTaskbar = false;
                    }
                    PrintMode = EPrintMode.DIRECT;
                    PrintSec();

                    if (StartUpKBN == "1")
                    {
                        EndSec();
                    }
                }
            }
            catch (Exception ex)
            {
                //エラー時共通処理
                MessageBox.Show(ex.Message);
                EndSec();
            }
        }
 private void SetRequireField()
 {
     TxtSoukoName.Require(true);
     CboStoreCD.Require(true);
     CboSoukoType.Require(true);
     //soukotype==5
     //ScSoukoMakerCD.TxtCode.Require(true);
     //ScSoukoMakerCD.TxtChangeDate.Require(true);
     //soukotpe==8
     //TxtHikiateOrder.Require(true);
 }
Ejemplo n.º 9
0
        private void Form_Load(object sender, EventArgs e)
        {
            try
            {
                base.InProgramID = ProID;
                base.InProgramNM = ProNm;

                this.SetFunctionLabel(EProMode.BATCH);
                this.InitialControlArray();
                base.Btn_F12.Text = "データ出力(F12)";

                //起動時共通処理
                base.StartProgram();

                //コンボボックス初期化
                string ymd = bbl.GetDate();
                CboStoreCD.Bind(ymd);

                mibl = new EDIHacchuu_BL();

                //検索用のパラメータ設定
                string stores = GetAllAvailableStores();
                ScOrderNO.Value1    = InOperatorCD;
                ScOrderNO.Value2    = stores;
                ScEDIOrderNO.Value1 = InOperatorCD;
                ScEDIOrderNO.Value2 = stores;
                ScVendor.Value1     = "1";

                //スタッフマスター(M_Staff)に存在すること
                //[M_Staff]
                M_Staff_Entity mse = new M_Staff_Entity
                {
                    StaffCD    = InOperatorCD,
                    ChangeDate = ymd
                };
                Staff_BL bl  = new Staff_BL();
                bool     ret = bl.M_Staff_Select(mse);
                if (ret)
                {
                    CboStoreCD.SelectedValue = mse.StoreCD;
                }

                SetFuncKeyAll(this, "100001000001");
                Scr_Clr(0);
            }
            catch (Exception ex)
            {
                //エラー時共通処理
                MessageBox.Show(ex.Message);
                EndSec();
            }
        }
Ejemplo n.º 10
0
        public Search_ArrivalNO(string changeDate)
        {
            InitializeComponent();

            InitialControlArray();

            HeaderTitleText = ProNm;
            this.Text       = ProNm;

            CboStoreCD.Bind(changeDate);

            nnbl = new NyuukaNyuuryoku_BL();
        }
Ejemplo n.º 11
0
        public FrmSearch_Souko(string changeDate)
        {
            InitializeComponent();

            F9Visible          = false;
            F11Visible         = false;
            lblChangeDate.Text = changeDate;

            CboStoreCD.Bind(changeDate, "2");
            CboSoukoType.Bind(changeDate);

            ssbl = new Search_Souko_BL();
        }
        public Search_ShiireNO(string changeDate)
        {
            InitializeComponent();

            InitialControlArray();

            HeaderTitleText = ProNm;
            this.Text       = ProNm;

            CboStoreCD.Bind(changeDate);

            snbl = new ShiireNyuuryokuFromNyuuka_BL();
        }
Ejemplo n.º 13
0
        public Search_EDIHacchuuNO(string changeDate)
        {
            InitializeComponent();

            InitialControlArray();

            HeaderTitleText = ProNm;
            this.Text       = ProNm;

            CboStoreCD.Bind(changeDate);

            ehbl = new EDIHacchuu_BL();
        }
        public Search_HacchuuShoriNO(string changeDate)
        {
            InitializeComponent();

            InitialControlArray();

            HeaderTitleText = ProNm;
            this.Text       = ProNm;

            CboStoreCD.Bind(changeDate);

            tjbl = new IkkatuHacchuuNyuuryoku_BL();
        }
        private void Form_Load(object sender, EventArgs e)
        {
            try
            {
                InProgramID = ProID;
                InProgramNM = ProNm;

                this.SetFunctionLabel(EProMode.SHOW);   //照会プログラムとして起動
                this.InitialControlArray();

                //起動時共通処理
                base.StartProgram();
                Btn_F6.Text = "";

                if (Kidou.Equals(1))
                {
                    //単独起動でない場合、ファンクション名は「戻る」
                    Btn_F1.Text  = "F1:戻る";
                    Btn_F12.Text = "F12:確定";
                }
                //コンボボックス初期化
                string ymd = bbl.GetDate();
                nnbl = new NyuukinNyuuryoku_BL();
                CboStoreCD.Bind(ymd);

                Scr_Clr(0);

                //スタッフマスター(M_Staff)に存在すること
                //[M_Staff]
                M_Staff_Entity mse = new M_Staff_Entity
                {
                    StaffCD    = InOperatorCD,
                    ChangeDate = ymd
                };
                Staff_BL bl  = new Staff_BL();
                bool     ret = bl.M_Staff_Select(mse);
                if (ret)
                {
                    CboStoreCD.SelectedValue = mse.StoreCD;
                }

                detailControls[0].Focus();
            }
            catch (Exception ex)
            {
                //エラー時共通処理
                MessageBox.Show(ex.Message);
                EndSec();
            }
        }
        public Search_TempoUriageNO(string changeDate)
        {
            InitializeComponent();

            InitialControlArray();

            HeaderTitleText = ProNm;
            this.Text       = ProNm;

            CboStoreCD.Bind(changeDate);
            ScCustomer.Value1 = "1";

            ssbl = new Search_TempoUriageNO_BL();
        }
Ejemplo n.º 17
0
        private void Form_Load(object sender, EventArgs e)
        {
            try
            {
                InProgramID = ProID;
                InProgramNM = ProNm;

                this.SetFunctionLabel(EProMode.SHOW);   //照会プログラムとして起動
                this.InitialControlArray();

                //起動時共通処理
                base.StartProgram();
                Btn_F6.Text = "";
                Btn_F9.Text = "";

                //コンボボックス初期化
                string ymd = bbl.GetDate();
                mibl = new MiNyuukinKakuninShoukai_BL();
                CboStoreCD.Bind(ymd);
                Bind(CboPaymentMethodCD, 1);

                Scr_Clr(0);

                //スタッフマスター(M_Staff)に存在すること
                //[M_Staff]
                M_Staff_Entity mse = new M_Staff_Entity
                {
                    StaffCD    = InOperatorCD,
                    ChangeDate = mibl.GetDate()
                };
                Staff_BL bl  = new Staff_BL();
                bool     ret = bl.M_Staff_Select(mse);
                if (ret)
                {
                    CboStoreCD.SelectedValue = mse.StoreCD;
                }

                //detailControls[(int)EIndex.ShippingDateFrom].Text = ymd;
                //detailControls[(int)EIndex.ShippingDateTo].Text = ymd;

                detailControls[(int)EIndex.StoreCD].Focus();
            }
            catch (Exception ex)
            {
                //エラー時共通処理
                MessageBox.Show(ex.Message);
                EndSec();
            }
        }
Ejemplo n.º 18
0
        public Search_Mitsumori(string changeDate)
        {
            InitializeComponent();

            InitialControlArray();

            HeaderTitleText = ProNm;
            this.Text       = ProNm;

            CboStoreCD.Bind(changeDate);
            CboJuchuuChanceKBN.Bind(changeDate);

            ScCustomer.Value1 = "1";

            ssbl = new MitsumoriNyuuryoku_BL();
        }
Ejemplo n.º 19
0
        private System.Windows.Forms.Control previousCtrl; // カーソルの元の位置を待避

        public Search_JuchuuNO(string changeDate)
        {
            InitializeComponent();

            this.InitialControlArray();

            HeaderTitleText = ProNm;
            this.Text       = ProNm;

            CboStoreCD.Bind(changeDate);

            //検索用のパラメータ設定
            ScCustomer.Value1 = "1";

            ssbl = new TempoJuchuuShoukai_BL();
        }
Ejemplo n.º 20
0
        private void Form_Load(object sender, EventArgs e)
        {
            try
            {
                base.InProgramID = ProID;
                base.InProgramNM = ProNm;

                this.SetFunctionLabel(EProMode.SHOW);
                this.InitialControlArray();

                Btn_F2.Text  = "新規受注(F2)";
                Btn_F10.Text = "出力(F10)";

                //起動時共通処理
                base.StartProgram();

                //初期値セット
                ssbl = new TempoJuchuuShoukai_BL();
                string ymd = ssbl.GetDate();
                CboStoreCD.Bind(ymd);

                //検索用のパラメータ設定
                string stores = GetAllAvailableStores();
                ScJuchuuNO.Value1   = InOperatorCD;
                ScJuchuuNO.Value2   = stores;
                ScJuchuuNOTo.Value1 = InOperatorCD;
                ScJuchuuNOTo.Value2 = stores;
                ScCustomer.Value1   = "1";

                SetFuncKeyAll(this, "110001000010");
                Scr_Clr(0);
            }
            catch (Exception ex)
            {
                //エラー時共通処理
                MessageBox.Show(ex.Message);
                EndSec();
            }
        }
        private void Form_Load(object sender, EventArgs e)
        {
            try
            {
                base.InProgramID = ProID;
                base.InProgramNM = ProNm;

                this.SetFunctionLabel(EProMode.SHOW);   //照会プログラムとして起動
                this.InitialControlArray();

                //起動時共通処理
                base.StartProgram();

                Btn_F12.Text = "F12:新規入金";

                //初期値セット
                nnbl = new NyuukinNyuuryoku_BL();
                string ymd = nnbl.GetDate();
                CboStoreCD.Bind(ymd);
                CboArrivalPlan.Bind(ymd);
                //パラメータ 基準日:Form.日付,店舗:Form.店舗	,得意先区分:3
                ScCustomer.Value1 = "3";

                SetFuncKeyAll(this, "100001000011");

                //画面転送表00に従って、画面情報を表示(Display screen information according to "画面転送表00")
                Scr_Clr(0);

                detailControls[0].Focus();
            }
            catch (Exception ex)
            {
                //エラー時共通処理
                MessageBox.Show(ex.Message);
                EndSec();
            }
        }
Ejemplo n.º 22
0
        private void Form_Load(object sender, EventArgs e)
        {
            try
            {
                base.InProgramID = ProID;
                base.InProgramNM = ProNm;

                this.SetFunctionLabel(EProMode.BATCH);
                this.InitialControlArray();

                //起動時共通処理
                base.StartProgram();

                ssbl = new SeikyuuShimeShori_BL();
                string ymd = bbl.GetDate();
                CboStoreCD.Bind(ymd);

                BindCombo("KBN", "Name");

                //基準日:Form.請求締日	(未入力時はToday)得意先区分:2
                ScCustomer.Value1 = "2";

                SetFuncKeyAll(this, "100001000001");
                Scr_Clr(0);

                ExecDisp();

                detailControls[(int)EIndex.Syori].Focus();
            }
            catch (Exception ex)
            {
                //エラー時共通処理
                MessageBox.Show(ex.Message);
                EndSec();
            }
        }
Ejemplo n.º 23
0
        /// <summary>
        /// HEAD部のコードチェック
        /// </summary>
        /// <param name="index"></param>
        /// <param name="set">画面展開なしの場合:falesに設定する</param>
        /// <returns></returns>
        private bool CheckDetail(int index, bool set = true)
        {
            bool ret;

            switch (index)
            {
            case (int)EIndex.DayStart:
            case (int)EIndex.DayEnd:
            case (int)EIndex.SalesDateFrom:
            case (int)EIndex.SalesDateTo:
            case (int)EIndex.BillingDateFrom:
            case (int)EIndex.BillingDateTo:
            case (int)EIndex.CollectDateFrom:
            case (int)EIndex.CollectDateTo:
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    return(true);
                }

                detailControls[index].Text = bbl.FormatDate(detailControls[index].Text);

                //日付として正しいこと(Be on the correct date)E103
                if (!bbl.CheckDate(detailControls[index].Text))
                {
                    //E103
                    bbl.ShowMessage("E103");
                    return(false);
                }
                //見積日(From) ≧ 見積日(To)である場合Error
                if (index == (int)EIndex.DayEnd || index == (int)EIndex.SalesDateTo || index == (int)EIndex.BillingDateTo || index == (int)EIndex.CollectDateTo)
                {
                    if (!string.IsNullOrWhiteSpace(detailControls[index - 1].Text) && !string.IsNullOrWhiteSpace(detailControls[index].Text))
                    {
                        int result = detailControls[index].Text.CompareTo(detailControls[index - 1].Text);
                        if (result < 0)
                        {
                            bbl.ShowMessage("E104");
                            detailControls[index].Focus();
                            return(false);
                        }
                    }
                }

                break;

            case (int)EIndex.StoreCD:
                //選択なくてもよい
                if (CboStoreCD.SelectedIndex <= 0)
                {
                    //bbl.ShowMessage("E102");
                    //CboStoreCD.Focus();
                    //return false;
                    return(true);
                }
                else
                {
                    //店舗権限のチェック
                    if (!base.CheckAvailableStores(CboStoreCD.SelectedValue.ToString()))
                    {
                        CboStoreCD.MoveNext = false;
                        bbl.ShowMessage("E141");
                        CboStoreCD.Focus();
                        return(false);
                    }
                }
                break;

            case (int)EIndex.CustomerCD:
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    ScCustomer.LabelText = "";
                    return(true);
                }

                //[M_Customer_Select]
                M_Customer_Entity mce = new M_Customer_Entity
                {
                    CustomerCD = detailControls[index].Text,
                    ChangeDate = bbl.GetDate()
                };
                Customer_BL sbl = new Customer_BL();
                ret = sbl.M_Customer_Select(mce);
                if (ret)
                {
                    ScCustomer.LabelText = mce.CustomerName;
                }
                else
                {
                    bbl.ShowMessage("E101");
                    ScCustomer.LabelText = "";
                    return(false);
                }

                break;

            case (int)EIndex.VendorCD:
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    ScVendor.LabelText = "";
                    return(true);
                }

                //[M_VendorCD_Select]
                M_Vendor_Entity mve = new M_Vendor_Entity
                {
                    VendorCD   = detailControls[index].Text,
                    ChangeDate = bbl.GetDate()
                };
                Vendor_BL vbl = new Vendor_BL();
                ret = vbl.M_Vendor_SelectTop1(mve);
                if (ret)
                {
                    ScVendor.LabelText = mve.VendorName;
                }
                else
                {
                    bbl.ShowMessage("E101");
                    ScVendor.LabelText = "";
                    return(false);
                }

                break;

            case (int)EIndex.StaffCD:
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    ScStaff.LabelText = "";
                    return(true);
                }

                //スタッフマスター(M_Staff)に存在すること
                //[M_Staff]
                M_Staff_Entity mse = new M_Staff_Entity
                {
                    StaffCD    = detailControls[index].Text,
                    ChangeDate = bbl.GetDate()
                };
                Staff_BL bl = new Staff_BL();
                ret = bl.M_Staff_Select(mse);
                if (ret)
                {
                    ScStaff.LabelText = mse.StaffName;
                }
                else
                {
                    bbl.ShowMessage("E101");
                    ScStaff.LabelText = "";
                    return(false);
                }
                break;
            }

            return(true);
        }
        /// <summary>
        /// HEAD部のコードチェック
        /// </summary>
        /// <param name="index"></param>
        /// <param name="set">画面展開なしの場合:falesに設定する</param>
        /// <returns></returns>
        private bool CheckDetail(int index, bool set = true)
        {
            bool ret;

            switch (index)
            {
            case (int)EIndex.OrderDateFrom:
            case (int)EIndex.OrderDateTo:
            case (int)EIndex.ArrivalPlanDateFrom:
            case (int)EIndex.ArrivalPlanDateTo:
            case (int)EIndex.ArrivalPlanMonthFrom:
            case (int)EIndex.ArrivalPlanMonthTo:
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    return(true);
                }

                string strYmd = "";
                switch (index)
                {
                case (int)EIndex.ArrivalPlanMonthFrom:
                case (int)EIndex.ArrivalPlanMonthTo:
                    strYmd = bbl.FormatDate(detailControls[index].Text + "/01");

                    break;

                default:
                    strYmd = bbl.FormatDate(detailControls[index].Text);
                    break;
                }

                //日付として正しいこと(Be on the correct date)E103
                //if (!bbl.CheckDate(strYmd))
                //{
                //    //E103
                //    bbl.ShowMessage("E103");
                //    return false;
                //}

                //switch (index)
                //{
                //    case (int)EIndex.ArrivalPlanMonthFrom:
                //    case (int)EIndex.ArrivalPlanMonthTo:
                //        detailControls[index].Text = strYmd.Substring(0, 7);
                //        break;
                //    default:
                //        detailControls[index].Text = strYmd;
                //        break;
                //}

                //見積日(From) ≧ 見積日(To)である場合Error
                if (index == (int)EIndex.OrderDateTo || index == (int)EIndex.ArrivalPlanDateTo || index == (int)EIndex.ArrivalPlanMonthTo)
                {
                    if (!string.IsNullOrWhiteSpace(detailControls[index - 1].Text) && !string.IsNullOrWhiteSpace(detailControls[index].Text))
                    {
                        int result = detailControls[index].Text.CompareTo(detailControls[index - 1].Text);
                        if (result < 0)
                        {
                            bbl.ShowMessage("E104");
                            detailControls[index].Focus();
                            return(false);
                        }
                    }
                }
                //発注日のどちらかに入力があった場合に、未確定分、完売、不要のチェックボックスの入力を可能にする
                if (!string.IsNullOrWhiteSpace(detailControls[(int)EIndex.OrderDateFrom].Text) || !string.IsNullOrWhiteSpace(detailControls[(int)EIndex.OrderDateTo].Text))
                {
                    ChkMikakutei.Enabled = true;
                    ChkKanbai.Enabled    = true;
                    ChkFuyo.Enabled      = true;
                }

                break;

            case (int)EIndex.OrderCD:
                //入力無くても良い(It is not necessary to input)
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    //情報ALLクリア
                    ClearCustomerInfo();
                    return(true);
                }

                //[M_Vendor_Select]
                M_Vendor_Entity mve = new M_Vendor_Entity
                {
                    VendorCD   = detailControls[index].Text,
                    VendorFlg  = "1",
                    ChangeDate = bbl.GetDate()
                };
                Vendor_BL sbl = new Vendor_BL();
                ret = sbl.M_Vendor_SelectTop1(mve);

                if (ret)
                {
                    if (mve.DeleteFlg == "1")
                    {
                        bbl.ShowMessage("E119");
                        //顧客情報ALLクリア
                        ClearCustomerInfo();
                        return(false);
                    }
                    ScOrderCD.LabelText = mve.VendorName;
                }
                else
                {
                    bbl.ShowMessage("E101");
                    //顧客情報ALLクリア
                    ClearCustomerInfo();
                    return(false);
                }

                break;

            case (int)EIndex.StoreCD:
                //選択必須(Entry required)
                if (!RequireCheck(new Control[] { detailControls[index] }))
                {
                    return(false);
                }
                else
                {
                    if (!base.CheckAvailableStores(CboStoreCD.SelectedValue.ToString()))
                    {
                        bbl.ShowMessage("E141");
                        CboStoreCD.Focus();
                        return(false);
                    }
                }

                break;
            }

            return(true);
        }
Ejemplo n.º 25
0
        /// <summary>
        /// HEAD部のコードチェック
        /// </summary>
        /// <param name="index"></param>
        /// <param name="set">画面展開なしの場合:falesに設定する</param>
        /// <returns></returns>
        private bool CheckDetail(int index, bool set = true)
        {
            bool ret;

            switch (index)
            {
            case (int)EIndex.Syori:
                //選択必須(Entry required)
                if (!RequireCheck(new Control[] { detailControls[index] }))
                {
                    cboSyori.MoveNext = false;
                    return(false);
                }
                break;

            case (int)EIndex.SeqSDT:
                //必須入力(Entry required)、入力なければエラー(If there is no input, an error)E102
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    //E102
                    bbl.ShowMessage("E102");
                    return(false);
                }

                detailControls[index].Text = ssbl.FormatDate(detailControls[index].Text);

                //日付として正しいこと(Be on the correct date)E103
                if (!ssbl.CheckDate(detailControls[index].Text))
                {
                    //E103
                    ssbl.ShowMessage("E103");
                    return(false);
                }
                //入力できる範囲内の日付であること
                if (!bbl.CheckInputPossibleDate(detailControls[index].Text))
                {
                    //E115
                    bbl.ShowMessage("E115");
                    return(false);
                }
                ScCustomer.ChangeDate = detailControls[index].Text;
                break;

            case (int)EIndex.Simbi:
                //必須入力(Entry required)、入力なければエラー(If there is no input, an error)E102
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    //E102
                    bbl.ShowMessage("E102");
                    return(false);
                }

                //1~31以外はエラー
                int simebi = Convert.ToInt32(detailControls[index].Text);
                if (simebi < 1 || simebi > 31)
                {
                    //E103
                    bbl.ShowMessage("E103");
                    return(false);
                }
                break;

            case (int)EIndex.CustomerCD:
                //入力無くても良い(It is not necessary to input)
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    //顧客情報ALLクリア
                    ClearCustomerInfo();
                    return(true);
                }

                string ymd = detailControls[(int)EIndex.SeqSDT].Text;
                if (string.IsNullOrWhiteSpace(ymd))
                {
                    ymd = bbl.GetDate();
                }

                //[M_Customer_Select]
                M_Customer_Entity mce = new M_Customer_Entity
                {
                    CustomerCD = detailControls[index].Text,
                    ChangeDate = ymd
                };

                Customer_BL sbl = new Customer_BL();
                ret = sbl.M_Customer_Select(mce);
                if (ret)
                {
                    if (mOldCustomerCD != detailControls[index].Text)
                    {
                        ScCustomer.LabelText = mce.CustomerName;
                        if (mce.VariousFLG == "1")
                        {
                            //detailControls[index + 1].Text = mce.CustomerName;
                            //    detailControls[index + 1].Enabled = true;
                        }
                        else
                        {
                            //detailControls[index + 1].Text = mce.CustomerName;
                        }
                    }
                }
                else
                {
                    bbl.ShowMessage("E101");
                    //顧客情報ALLクリア
                    ClearCustomerInfo();
                    return(false);
                }

                mOldCustomerCD = detailControls[index].Text;        //位置確認

                break;

            //case (int)EIndex.CustomerName:
            //    //入力可能の場合 入力必須(Entry required)
            //    if (detailControls[index].Enabled && string.IsNullOrWhiteSpace(detailControls[index].Text))
            //    {
            //        //E102
            //        bbl.ShowMessage("E102");
            //        return false;
            //    }
            //    break;

            case (int)EIndex.StoreCD:
                //選択必須(Entry required)
                if (!RequireCheck(new Control[] { detailControls[index] }))
                {
                    CboStoreCD.MoveNext = false;
                    return(false);
                }
                else
                {
                    if (!base.CheckAvailableStores(CboStoreCD.SelectedValue.ToString()))
                    {
                        CboStoreCD.MoveNext = false;
                        bbl.ShowMessage("E141");
                        CboStoreCD.Focus();
                        return(false);
                    }
                    ExecDisp();
                }

                break;
            }

            return(true);
        }
Ejemplo n.º 26
0
        /// <summary>
        /// HEAD部のコードチェック
        /// </summary>
        /// <param name="index"></param>
        /// <param name="set">画面展開なしの場合:falesに設定する</param>
        /// <returns></returns>
        private bool CheckDetail(int index, bool set = true)
        {
            if (detailControls[index].GetType().Equals(typeof(CKM_Controls.CKM_TextBox)))
            {
                if (((CKM_Controls.CKM_TextBox)detailControls[index]).isMaxLengthErr)
                {
                    return(false);
                }
            }

            switch (index)
            {
            case (int)EIndex.DayStart:
            case (int)EIndex.DayEnd:
            case (int)EIndex.ArrivalPlanDateFrom:
            case (int)EIndex.ArrivalPlanDateTo:
            case (int)EIndex.ArrivalDateFrom:
            case (int)EIndex.ArrivalDateTo:
            case (int)EIndex.PurchaseDateFrom:
            case (int)EIndex.PurchaseDateTo:
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    return(true);
                }

                detailControls[index].Text = bbl.FormatDate(detailControls[index].Text);

                //日付として正しいこと(Be on the correct date)E103
                if (!bbl.CheckDate(detailControls[index].Text))
                {
                    //E103
                    bbl.ShowMessage("E103");
                    return(false);
                }
                //見積日(From) ≧ 見積日(To)である場合Error
                if (index == (int)EIndex.DayEnd || index == (int)EIndex.ArrivalPlanDateTo || index == (int)EIndex.ArrivalDateTo || index == (int)EIndex.PurchaseDateTo)
                {
                    if (!string.IsNullOrWhiteSpace(detailControls[index - 1].Text) && !string.IsNullOrWhiteSpace(detailControls[index].Text))
                    {
                        int result = detailControls[index].Text.CompareTo(detailControls[index - 1].Text);
                        if (result < 0)
                        {
                            bbl.ShowMessage("E104");
                            detailControls[index].Focus();
                            return(false);
                        }
                    }
                }

                break;

            case (int)EIndex.StoreCD:
                if (CboStoreCD.SelectedIndex == -1)
                {
                    bbl.ShowMessage("E102");
                    CboStoreCD.Focus();
                    return(false);
                }
                else
                {
                    //店舗権限のチェック
                    if (!base.CheckAvailableStores(CboStoreCD.SelectedValue.ToString()))
                    {
                        bbl.ShowMessage("E141");
                        CboStoreCD.Focus();
                        return(false);
                    }
                }
                break;

            case (int)EIndex.VendorCD:
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    ScVendor.LabelText = "";
                    return(true);
                }

                //string ymd = detailControls[(int)EIndex.]
                //[M_VendorCD_Select]
                M_Vendor_Entity mce = new M_Vendor_Entity
                {
                    VendorCD   = detailControls[index].Text,
                    VendorFlg  = "1",
                    ChangeDate = bbl.GetDate()
                };
                Vendor_BL sbl = new Vendor_BL();
                bool      ret = sbl.M_Vendor_SelectTop1(mce);
                if (ret)
                {
                    ScVendor.LabelText = mce.VendorName;
                }
                else
                {
                    bbl.ShowMessage("E101");
                    ScVendor.LabelText = "";
                    return(false);
                }

                break;
            }

            return(true);
        }
        /// <summary>
        /// HEAD部のコードチェック
        /// </summary>
        /// <param name="index"></param>
        /// <param name="set">画面展開なしの場合:falesに設定する</param>
        /// <returns></returns>
        private bool CheckDetail(int index, bool set = true)
        {
            bool ret;

            switch (index)
            {
            case (int)EIndex.DayStart:
            case (int)EIndex.DayEnd:
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    return(true);
                }

                detailControls[index].Text = mibl.FormatDate(detailControls[index].Text);

                //日付として正しいこと(Be on the correct date)E103
                if (!mibl.CheckDate(detailControls[index].Text))
                {
                    //E103
                    mibl.ShowMessage("E103");
                    return(false);
                }
                //(From) ≧ (To)である場合Error
                if (index == (int)EIndex.DayEnd)
                {
                    if (!string.IsNullOrWhiteSpace(detailControls[index - 1].Text) && !string.IsNullOrWhiteSpace(detailControls[index].Text))
                    {
                        int result = detailControls[index].Text.CompareTo(detailControls[index - 1].Text);
                        if (result < 0)
                        {
                            //E106
                            mibl.ShowMessage("E104");
                            detailControls[index].Focus();
                            return(false);
                        }
                    }

                    ScCustomer.ChangeDate = detailControls[index].Text;
                }


                break;

            case (int)EIndex.StaffCD:
                //入力無くても良い(It is not necessary to input)
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    ScStaff.LabelText = "";
                    return(true);
                }

                //スタッフマスター(M_Staff)に存在すること
                //[M_Staff]
                M_Staff_Entity mse = new M_Staff_Entity
                {
                    StaffCD    = detailControls[index].Text,
                    ChangeDate = bbl.GetDate()
                };
                Staff_BL bl = new Staff_BL();
                ret = bl.M_Staff_Select(mse);
                if (ret)
                {
                    ScStaff.LabelText = mse.StaffName;
                }
                else
                {
                    bbl.ShowMessage("E101");
                    ScStaff.LabelText = "";
                    return(false);
                }
                break;


            case (int)EIndex.CustomerCD:
                //入力無くても良い(It is not necessary to input)
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    //顧客情報ALLクリア
                    ClearCustomerInfo();
                    return(true);
                }

                //[M_Customer_Select]
                M_Customer_Entity mce = new M_Customer_Entity
                {
                    CustomerCD = detailControls[index].Text,
                    ChangeDate = bbl.GetDate()
                };
                Customer_BL sbl = new Customer_BL();
                ret = sbl.M_Customer_Select(mce);
                if (ret)
                {
                    //ScCustomer.LabelText = mce.CustomerName;
                    if (mOldCustomerCD != detailControls[index].Text)
                    {
                        if (mce.VariousFLG == "1")
                        {
                            detailControls[index + 1].Text    = mce.CustomerName;
                            detailControls[index + 1].Enabled = true;
                        }
                        else
                        {
                            ScCustomer.LabelText = mce.CustomerName;
                            //  detailControls[index + 1].Text = mce.CustomerCD;
                            //// [M_Store_Select]
                            //   M_Store_Entity me = new M_Store_Entity
                            //   {
                            //       StoreCD = mce.LastSalesStoreCD,
                            //      ChangeDate = mce.LastSalesDate
                            //   };
                        }
                    }
                }
                else
                {
                    bbl.ShowMessage("E101");
                    //顧客情報ALLクリア
                    ClearCustomerInfo();
                    return(false);
                }

                mOldCustomerCD = detailControls[index].Text;        //位置確認

                break;

            //case (int)EIndex.CustomerName:
            //    //入力可能の場合 入力必須(Entry required)
            //    if (detailControls[index].Enabled && string.IsNullOrWhiteSpace(detailControls[index].Text))
            //    {
            //        //E102
            //        bbl.ShowMessage("E102");
            //        return false;
            //    }
            //    break;

            case (int)EIndex.StoreCD:
                if (CboStoreCD.SelectedValue.Equals("-1"))
                {
                    CboStoreCD.MoveNext = false;
                    bbl.ShowMessage("E102");
                    CboStoreCD.Focus();
                    return(false);
                }
                else
                {
                    if (!base.CheckAvailableStores(CboStoreCD.SelectedValue.ToString()))
                    {
                        CboStoreCD.MoveNext = false;
                        bbl.ShowMessage("E141");
                        CboStoreCD.Focus();
                        return(false);
                    }
                }

                break;
            }

            return(true);
        }
        private bool CheckDetail(int index)
        {
            switch (index)
            {
            case (int)EIndex.DayStart:
            case (int)EIndex.DayEnd:
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    return(true);
                }

                detailControls[index].Text = tjbl.FormatDate(detailControls[index].Text);

                //日付として正しいこと(Be on the correct date)E103
                if (!tjbl.CheckDate(detailControls[index].Text))
                {
                    //E103
                    tjbl.ShowMessage("E103");
                    return(false);
                }
                //見積日(From) ≧ 見積日(To)である場合Error
                if (index == (int)EIndex.DayEnd)
                {
                    if (!string.IsNullOrWhiteSpace(detailControls[index - 1].Text) && !string.IsNullOrWhiteSpace(detailControls[index].Text))
                    {
                        int result = detailControls[index].Text.CompareTo(detailControls[index - 1].Text);
                        if (result < 0)
                        {
                            //E106
                            tjbl.ShowMessage("E104");
                            detailControls[index].Focus();
                            return(false);
                        }
                    }
                }

                break;

            case (int)EIndex.StoreCD:
                if (CboStoreCD.SelectedValue.Equals("-1"))
                {
                    tjbl.ShowMessage("E102");
                    CboStoreCD.Focus();
                    return(false);
                }
                //else
                //{
                //    //店舗権限のチェック、引数で処理可能店舗の配列をセットしたい
                //    if (!base.CheckAvailableStores(CboStoreCD.SelectedValue.ToString()))
                //    {
                //        tjbl.ShowMessage("E141");
                //        CboStoreCD.Focus();
                //        return false;
                //    }
                //}
                break;

            case (int)EIndex.StaffCD:
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    ScStaff.LabelText = "";
                    return(true);
                }

                //スタッフマスター(M_Staff)に存在すること
                //[M_Staff]
                M_Staff_Entity mse = new M_Staff_Entity
                {
                    StaffCD    = detailControls[index].Text,
                    ChangeDate = tjbl.GetDate()     // detailControls[(int)EIndex.MitsumoriDate].Text
                };
                Staff_BL bl  = new Staff_BL();
                bool     ret = bl.M_Staff_Select(mse);
                if (ret)
                {
                    ScStaff.LabelText = mse.StaffName;
                }
                else
                {
                    tjbl.ShowMessage("E101");
                    ScStaff.LabelText = "";
                    return(false);
                }
                break;

                //case (int)EIndex.MitsumoriName:

                //    break;
            }

            return(true);
        }
        /// <summary>
        /// HEAD部のコードチェック
        /// </summary>
        /// <param name="index"></param>
        /// <param name="set">画面展開なしの場合:falesに設定する</param>
        /// <returns></returns>
        private bool CheckDetail(int index, bool set = true)
        {
            if (detailControls[index].GetType().Equals(typeof(CKM_Controls.CKM_TextBox)))
            {
                if (((CKM_Controls.CKM_TextBox)detailControls[index]).isMaxLengthErr)
                {
                    return(false);
                }
            }

            switch (index)
            {
            case (int)EIndex.DayStart:
            case (int)EIndex.DayEnd:
            case (int)EIndex.InputDateFrom:
            case (int)EIndex.InputDateTo:
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    return(true);
                }

                detailControls[index].Text = bbl.FormatDate(detailControls[index].Text);

                //日付として正しいこと(Be on the correct date)E103
                if (!bbl.CheckDate(detailControls[index].Text))
                {
                    //E103
                    bbl.ShowMessage("E103");
                    return(false);
                }
                //(From) ≧ (To)である場合Error
                if (index == (int)EIndex.DayEnd || index == (int)EIndex.InputDateTo)
                {
                    if (!string.IsNullOrWhiteSpace(detailControls[index - 1].Text) && !string.IsNullOrWhiteSpace(detailControls[index].Text))
                    {
                        int result = detailControls[index].Text.CompareTo(detailControls[index - 1].Text);
                        if (result < 0)
                        {
                            bbl.ShowMessage("E104");
                            return(false);
                        }
                    }
                }

                break;

            case (int)EIndex.StoreCD:
                //選択必須(Entry required)
                if (!RequireCheck(new Control[] { detailControls[index] }))
                {
                    CboStoreCD.MoveNext = false;
                    return(false);
                }
                else
                {
                    //店舗権限のチェック
                    if (!base.CheckAvailableStores(CboStoreCD.SelectedValue.ToString()))
                    {
                        CboStoreCD.MoveNext = false;
                        bbl.ShowMessage("E141");
                        CboStoreCD.Focus();
                        return(false);
                    }

                    //パラメータ 基準日:Form.日付,店舗:Form.店舗	,得意先区分:3
                    ScCustomer.Value2 = CboStoreCD.SelectedValue.ToString();
                }
                break;

            case (int)EIndex.CboSyubetsu:
                //if (CboArrivalPlan.SelectedIndex == -1)
                //{
                //    bbl.ShowMessage("E102");
                //    CboArrivalPlan.Focus();
                //    return false;
                //}
                //else
                //{

                //}
                break;

            case (int)EIndex.CustomerCD:
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {       //顧客情報ALLクリア
                    ClearCustomerInfo();
                    return(true);
                }

                //[M_Customer_Select]
                M_Customer_Entity mce = new M_Customer_Entity
                {
                    CustomerCD = detailControls[index].Text,
                    ChangeDate = bbl.GetDate()
                };
                Customer_BL sbl = new Customer_BL();
                bool        ret = sbl.M_Customer_Select(mce);
                if (ret)
                {
                    //if (mce.DeleteFlg == "1")
                    //{
                    //    bbl.ShowMessage("E119");
                    //    //顧客情報ALLクリア
                    //    ClearCustomerInfo();
                    //    return false;
                    //}
                    ScCustomer.LabelText = mce.CustomerName;
                }
                else
                {
                    bbl.ShowMessage("E101");
                    ScCustomer.LabelText = "";
                    return(false);
                }

                break;

            case (int)EIndex.Staff:
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    ScStaff.LabelText = "";
                    return(true);
                }

                //[M_Staff_Select]
                M_Staff_Entity mse = new M_Staff_Entity
                {
                    StaffCD    = detailControls[index].Text,
                    ChangeDate = bbl.GetDate()
                };
                Staff_BL stbl = new Staff_BL();
                ret = stbl.M_Staff_Select(mse);
                if (ret)
                {
                    ScStaff.LabelText = mse.StaffName;
                }
                else
                {
                    bbl.ShowMessage("E101");
                    ScStaff.LabelText = "";
                    return(false);
                }

                break;
            }

            return(true);
        }
        /// <summary>
        /// HEAD部のコードチェック
        /// </summary>
        /// <param name="index"></param>
        /// <param name="set">画面展開なしの場合:falesに設定する</param>
        /// <returns></returns>
        private bool CheckDetail(int index, bool set = true)
        {
            bool ret;

            switch (index)
            {
            case (int)EIndex.DayStart:
            case (int)EIndex.DayEnd:
                //入力必須(Entry required)	入力なければError(If there is no input, an error)
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    mibl.ShowMessage("E102");
                    return(false);
                }

                string strYmd = bbl.FormatDate(detailControls[index].Text + "/01");

                //日付として正しいこと(Be on the correct date)E103
                if (!mibl.CheckDate(strYmd))
                {
                    //E103
                    mibl.ShowMessage("E103");
                    return(false);
                }
                detailControls[index].Text = strYmd.Substring(0, 7);

                //(From) ≧ (To)である場合Error
                if (index == (int)EIndex.DayEnd)
                {
                    if (!string.IsNullOrWhiteSpace(detailControls[index - 1].Text) && !string.IsNullOrWhiteSpace(detailControls[index].Text))
                    {
                        int result = detailControls[index].Text.CompareTo(detailControls[index - 1].Text);
                        if (result < 0)
                        {
                            //E106
                            mibl.ShowMessage("E104");
                            detailControls[index].Focus();
                            return(false);
                        }
                    }
                }


                break;

            case (int)EIndex.StoreCD:
                if (CboStoreCD.SelectedValue == null)
                {
                    return(true);
                }
                else
                {
                    if (!string.IsNullOrWhiteSpace(CboStoreCD.SelectedText))
                    {
                        if (!base.CheckAvailableStores(CboStoreCD.SelectedValue.ToString()))
                        {
                            CboStoreCD.MoveNext = false;
                            bbl.ShowMessage("E141");
                            CboStoreCD.Focus();
                            return(false);
                        }
                    }
                    return(true);
                }

                break;
            }

            return(true);
        }