Esempio n. 1
0
        public SqlDbType()
        {
            InitializeComponent();
            cf           = new CommonFunction();
            multi_Entity = new multipurposeEntity();
            dt_Main      = new DataTable();
            create_dt    = new DataTable();
            dt           = new DataTable();

            bbl               = new BaseBL();
            SEntity           = new TorikomiEntity();
            ShukkaTorikomi_BL = new ShukkaTorikomi_BL();
        }
Esempio n. 2
0
        public override void FunctionProcess(string tagID)
        {
            if (tagID == "6")
            {
                //Clear();
                rdo_Toroku.Checked = true;
                rdo_Toroku.Focus();
                Control btnF10 = this.TopLevelControl.Controls.Find("BtnF10", true)[0];
                btnF10.Visible = false;
                dataBind();
                gvShukkaTorikomi.ClearSelection();
                dt.Clear();
            }
            if (tagID == "10")
            {
                gvShukkaTorikomi.ActionType = "F10";
                if (rdo_Sakujo.Checked)
                {
                    txtDenpyouNO.E102Check(false);
                    txtDenpyouNO.E165Check(false, "ShukkaTorikom", txtDenpyouNO, null);
                }
                if (ErrorCheck(PanelDetail))
                {
                    DataGridviewBind();
                }
                gvShukkaTorikomi.ActionType = string.Empty;
            }
            //base.FunctionProcess(tagID);

            if (tagID == "12")
            {
                //HET
                (string, string)Xml         = (string.Empty, string.Empty);
                gvShukkaTorikomi.ActionType = "F10";
                if (rdo_Sakujo.Checked)
                {
                    txtDenpyouNO.E102Check(true);
                    txtDenpyouNO.E165Check(true, "ShukkaTorikom", txtDenpyouNO, null);
                }
                if (ErrorCheck(PanelDetail))             //HET
                {
                    if (rdo_Toroku.Checked)
                    {
                        Xml = ChooseFile();
                    }
                    else
                    {
                        Xml = ChooseFileDelete();
                    }

                    BaseBL bbl = new BaseBL();
                    if (!string.IsNullOrEmpty(Xml.Item1) && !string.IsNullOrEmpty(Xml.Item2))
                    {
                        DataTable         return_DT         = new DataTable();
                        ShukkaTorikomi_BL bl                = new ShukkaTorikomi_BL();
                        string            spname            = string.Empty;
                        string            TorikomiDenpyouNO = txtDenpyouNO.Text;

                        if (rdo_Toroku.Checked)
                        {
                            return_DT = bl.ShukkaTorikomi_CUD("ShukkaTorikomi_Insert", Xml.Item1, Xml.Item2, "ErrorCheck");
                            if (return_DT.Rows.Count > 0)
                            {
                                if (return_DT.Rows[0]["Result"].ToString().Equals("1"))
                                {
                                    if (bbl.ShowMessage("Q206") == DialogResult.Yes)
                                    {
                                        return_DT = bl.ShukkaTorikomi_CUD("ShukkaTorikomi_Insert", Xml.Item1, Xml.Item2, TorikomiDenpyouNO);
                                        if (return_DT.Rows.Count > 0)
                                        {
                                            if (return_DT.Rows[0]["Result"].ToString().Equals("1"))
                                            {
                                                bbl.ShowMessage("I002");
                                            }
                                            rdo_Toroku.Checked = true;
                                            rdo_Toroku.Focus();
                                        }
                                    }
                                    else
                                    {
                                        if (PreviousCtrl != null)
                                        {
                                            PreviousCtrl.Focus();
                                        }
                                    }
                                }
                                else
                                {
                                    bbl.ShowMessage("E276", return_DT.Rows[0]["SEQ"].ToString(), return_DT.Rows[0]["Error1"].ToString(), return_DT.Rows[0]["Error2"].ToString());
                                }
                            }
                        }
                        else
                        {
                            return_DT = bl.ShukkaTorikomi_CUD("NewShukkaTorikomi_Delete", Xml.Item1, Xml.Item2, TorikomiDenpyouNO);
                            if (return_DT.Rows.Count > 0)
                            {
                                if (return_DT.Rows[0]["Result"].ToString().Equals("1"))
                                {
                                    if (bbl.ShowMessage("Q102") == DialogResult.Yes)
                                    {
                                        return_DT = bl.ShukkaTorikomi_CUD("NewShukkaTorikomi_Delete", Xml.Item1, Xml.Item2, TorikomiDenpyouNO);
                                        bbl.ShowMessage("I002");
                                        rdo_Sakujo.Checked = true;
                                        txtDate1.Clear();
                                        txtDate2.Clear();
                                        txtDenpyouNO.Clear();
                                        txtDenpyouNO.Focus();
                                        DataGridviewBind();
                                    }
                                }
                                else
                                {
                                    bbl.ShowMessage("S013");
                                    txtDenpyouNO.Focus();
                                }
                            }
                            else
                            {
                                if (PreviousCtrl != null)
                                {
                                    PreviousCtrl.Focus();
                                }
                            }
                        }
                    }
                }
            }
        }
Esempio n. 3
0
        private (bool, DataTable) TextBoxErrorCheck(STextBox sTextBox)
        {
            DataTable rDt = new DataTable();

            if (sTextBox.E101 && !string.IsNullOrWhiteSpace(sTextBox.Text))
            {
                string result = string.Empty;
                switch (sTextBox.E101Type)
                {
                case "souko":
                    SoukoBL bl = new SoukoBL();
                    rDt    = bl.Souko_Select(sTextBox.ctrlE101_1.Text, "E101");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "M_Staff":
                    StaffBL sBL = new StaffBL();
                    rDt    = sBL.Staff_Select_Check(sTextBox.ctrlE101_1.Text, sTextBox.ctrlE101_2.Text, "E101");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "M_Tokuisaki":
                    TokuisakiBL tBL = new TokuisakiBL();
                    rDt    = tBL.M_Tokuisaki_Select(sTextBox.ctrlE101_1.Text, sTextBox.ctrlE101_2.Text, "E101");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "M_Kouriten":
                    KouritenBL kBL = new KouritenBL();
                    rDt    = kBL.Kouriten_Select_Check(sTextBox.ctrlE101_1.Text, sTextBox.ctrlE101_2.Text, "E101");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "M_Siiresaki":
                    SiiresakiBL BL = new SiiresakiBL();
                    rDt    = BL.Siiresaki_Select_Check(sTextBox.ctrlE101_1.Text, sTextBox.ctrlE101_2.Text, "E101");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "M_Shouhin":
                    ShouhinBL shouhin = new ShouhinBL();
                    string    id      = string.Empty;
                    switch (sTextBox.ctrlE101_1.Name)
                    {
                    case "txtTani":
                        id = "102";
                        break;

                    case "txtBrand":
                        id = "103";
                        break;

                    case "txtColor":
                        id = "104";
                        break;

                    case "txtCopyColor":
                        id = "104";
                        break;

                    case "txtSize":
                        id = "105";
                        break;

                    case "txtCopySize":
                        id = "105";
                        break;

                    case "txtIEvaluation":
                        id = "106";
                        break;

                    case "txtIManagement":
                        id = "107";
                        break;

                    case "txtTaxRate":
                        id = "221";
                        break;
                    }
                    rDt    = shouhin.Shouhin_Check(id, sTextBox.ctrlE101_1.Text, string.Empty, string.Empty, "E101");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "HikiateHenkouShoukai":
                    switch (sTextBox.ctrlE101_1.Name)
                    {
                    case "txtTokuisakiCD":
                        TokuisakiBL tokuisakiBL = new TokuisakiBL();
                        rDt = tokuisakiBL.M_Tokuisaki_Select(sTextBox.ctrlE101_1.Text, sTextBox.E102Type, "E101");
                        break;

                    case "txtKouritenCD":
                        KouritenBL kouritenbl = new KouritenBL();
                        rDt = kouritenbl.Kouriten_Select_Check(sTextBox.ctrlE101_1.Text, sTextBox.E102Type, "E101");
                        break;
                    }
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "M_MultiPorpose":
                    multipurposeEntity m_obj = new multipurposeEntity();
                    int multiVal             = 0;
                    if (sTextBox.SearchType == SearchType.ScType.Brand)
                    {
                        multiVal = 103;
                    }
                    else if (sTextBox.SearchType == SearchType.ScType.Partition)
                    {
                        multiVal = 101;
                    }
                    else if (sTextBox.SearchType == SearchType.ScType.Tani)
                    {
                        multiVal = 102;
                    }
                    else if (sTextBox.SearchType == SearchType.ScType.Color)
                    {
                        multiVal = 104;
                    }
                    else if (sTextBox.SearchType == SearchType.ScType.Size)
                    {
                        multiVal = 105;
                    }
                    else if (sTextBox.SearchType == SearchType.ScType.TaxRate)
                    {
                        multiVal = 221;
                    }
                    else if (sTextBox.SearchType == SearchType.ScType.Evaluation)
                    {
                        multiVal = 106;
                    }
                    else if (sTextBox.SearchType == SearchType.ScType.Management)
                    {
                        multiVal = 107;
                    }
                    else if (sTextBox.SearchType == SearchType.ScType.Kubun)
                    {
                        multiVal = 109;
                    }

                    m_obj.id        = multiVal;
                    m_obj.ErrorType = "E101";
                    m_obj.Key       = sTextBox.ctrlE101_1.Text;
                    multipurposeBL m_BL = new multipurposeBL();
                    rDt    = m_BL.GetPosition(m_obj);
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;
                }
                if (result.Equals("E101"))
                {
                    ShowErrorMessage("E101");
                    sTextBox.Text = string.Empty;
                    sTextBox.Focus();
                    return(true, rDt);
                }
            }

            if (sTextBox.E102)
            {
                if (string.IsNullOrWhiteSpace(sTextBox.Text))
                {
                    ShowErrorMessage("E102");
                    sTextBox.Focus();
                    return(true, rDt);
                }
            }

            if (sTextBox.E102Multi)
            {
                if (string.IsNullOrWhiteSpace(sTextBox.ctrlE102_1.Text) && !string.IsNullOrWhiteSpace(sTextBox.ctrlE102_2.Text))
                {
                    ShowErrorMessage("E102");
                    sTextBox.ctrlE102_1.Focus();
                    return(true, rDt);
                }
                else if (!string.IsNullOrWhiteSpace(sTextBox.ctrlE102_1.Text) && string.IsNullOrWhiteSpace(sTextBox.ctrlE102_2.Text))
                {
                    ShowErrorMessage("E102");
                    sTextBox.ctrlE102_2.Focus();
                    return(true, rDt);
                }
            }

            if (sTextBox.E103)
            {
                cf = new CommonFunction();
                if (!cf.DateCheck(sTextBox))
                {
                    ShowErrorMessage("E103");
                    sTextBox.Focus();

                    return(true, rDt);
                }
            }

            if (sTextBox.E104)
            {
                if (cf.CheckDateValue(sTextBox.ctrlE104_2.Text) && cf.CheckDateValue(sTextBox.ctrlE104_1.Text))
                {
                    //if(!string.IsNullOrEmpty(sTextBox.ctrlE104_2.Text) && !string.IsNullOrEmpty(sTextBox.ctrlE104_1.Text))
                    //{
                    DateTime LDate = Convert.ToDateTime(sTextBox.ctrlE104_2.Text);
                    DateTime JDate = Convert.ToDateTime(sTextBox.ctrlE104_1.Text);
                    if (JDate.Date > LDate.Date)
                    {
                        ShowErrorMessage("E104");
                        sTextBox.Focus();
                        return(true, rDt);
                    }
                }
            }
            if (sTextBox.E106)
            {
                if (!string.IsNullOrEmpty(sTextBox.ctrlE106_1.Text) && !string.IsNullOrEmpty(sTextBox.ctrlE106_2.Text))
                {
                    bool bl = Matches(sTextBox.ctrlE106_2.Text, sTextBox.ctrlE106_1.Text);
                    if (!bl)
                    {
                        ShowErrorMessage("E106");
                        sTextBox.Focus();
                        return(true, rDt);
                    }
                }
            }
            if (sTextBox.E115)
            {
                string result = string.Empty;
                switch (sTextBox.E115Type)
                {
                case "JuchuuNyuuryoku":
                    JuchuuListBL jbl = new JuchuuListBL();
                    rDt    = jbl.JuchuuNyuuryoku_Select_Check(string.Empty, sTextBox.ctrlE115_1.Text, "E115");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "ShukkaSiziNyuuryoku":
                    ShukkasiziNyuuryokuBL skszbl = new ShukkasiziNyuuryokuBL();
                    rDt    = skszbl.ShukkasiziNyuuryoku_ErrorCheck(sTextBox.ctrlE115_1.Text, "E115");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "ShukkaNyuuryoku":
                    ShukkaNyuuryokuBL sbl = new ShukkaNyuuryokuBL();
                    rDt    = sbl.ShukkaNyuuryoku_Select_Check(string.Empty, sTextBox.ctrlE115_1.Text, "E115");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "ChakuniNyuuryoku":
                    chakuniNyuuryoku_BL cbl = new chakuniNyuuryoku_BL();
                    rDt    = cbl.ChakuniNyuuryoku_Select(string.Empty, sTextBox.ctrlE115_1.Text, "E115");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "IdouNyuuryoku":
                    IdouNyuuryokuBL ibl = new IdouNyuuryokuBL();
                    rDt    = ibl.IdouNyuuryoku_Select_Check(string.Empty, sTextBox.ctrlE115_1.Text, "E115");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "ChakuniYoteiNyuuryoku":
                    ChakuniYoteiNyuuryoku_BL cybl = new ChakuniYoteiNyuuryoku_BL();
                    rDt    = cybl.ChakuniYoteiNyuuryoku_Select(string.Empty, sTextBox.ctrlE115_1.Text, "E115");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "HacchuuNyuuryoku":
                    HacchuuNyuuryokuBL h_bl = new HacchuuNyuuryokuBL();
                    rDt    = h_bl.HacchuuNyuuryoku_Select_Check(string.Empty, sTextBox.ctrlE115_1.Text, "E115");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;
                }
                if (result.Equals("E115"))
                {
                    ShowErrorMessage("E115");
                    sTextBox.Focus();
                    return(true, rDt);
                }
            }
            if (sTextBox.E132)
            {
                string    result = string.Empty;
                DataTable dt     = new DataTable();
                switch (sTextBox.E132Type)
                {
                case "souko":
                    SoukoBL bl = new SoukoBL();
                    rDt    = bl.Souko_Select(sTextBox.ctrlE132_1.Text, "E132");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "M_Staff":
                    StaffBL sBL = new StaffBL();
                    dt     = sBL.Staff_Select_Check(sTextBox.ctrlE132_1.Text, sTextBox.ctrlE132_2.Text, string.Empty);
                    rDt    = dt;
                    result = dt.Rows[0]["MessageID"].ToString();
                    break;

                case "M_Siiresaki":
                    SiiresakiBL obj = new SiiresakiBL();
                    dt     = obj.Siiresaki_Select_Check(sTextBox.ctrlE132_1.Text, sTextBox.ctrlE132_2.Text, string.Empty);
                    rDt    = dt;
                    result = dt.Rows[0]["MessageID"].ToString();
                    break;

                case "M_Tokuisaki":
                    TokuisakiBL tokuisakiBL = new TokuisakiBL();
                    dt     = tokuisakiBL.M_Tokuisaki_Select(sTextBox.ctrlE132_1.Text, sTextBox.ctrlE132_2.Text, string.Empty);
                    rDt    = dt;
                    result = dt.Rows[0]["MessageID"].ToString();
                    break;

                case "M_Kouriten":
                    KouritenBL objK = new KouritenBL();
                    dt     = objK.Kouriten_Select_Check(sTextBox.ctrlE132_1.Text, sTextBox.ctrlE132_2.Text, string.Empty, sTextBox.ctrlE132_3.Text);
                    rDt    = dt;
                    result = dt.Rows[0]["MessageID"].ToString();
                    break;

                case "ChakuniNyuuryoku":
                    chakuniNyuuryoku_BL cbl = new chakuniNyuuryoku_BL();
                    dt     = cbl.ChakuniNyuuryoku_Select(sTextBox.ctrlE132_1.Text, null, string.Empty);
                    rDt    = dt;
                    result = dt.Rows[0]["MessageID"].ToString();
                    break;

                case "ChakuniYoteiNyuuryoku":
                    ChakuniYoteiNyuuryoku_BL cybl = new ChakuniYoteiNyuuryoku_BL();
                    dt     = cybl.ChakuniYoteiNyuuryoku_Select(sTextBox.ctrlE132_1.Text, null, string.Empty);
                    rDt    = dt;
                    result = dt.Rows[0]["MessageID"].ToString();
                    break;

                case "denpyou":
                    DenpyouNOEntity denpyou_entity = new DenpyouNOEntity();
                    DenpyouNOBL     denpyou_bl     = new DenpyouNOBL();
                    denpyou_entity.RenbenKBN = sTextBox.ctrl_combo.SelectedValue.ToString();
                    denpyou_entity.seqno     = sTextBox.ctrlE132_2.Text.ToString();
                    denpyou_entity.prefix    = sTextBox.ctrlE132_1.Text;
                    denpyou_entity.MessageID = "E132";
                    rDt    = denpyou_bl.DenpyouNO_Check(denpyou_entity);
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;
                }
                if (result.Equals("E132"))
                {
                    ShowErrorMessage("E132");
                    sTextBox.Focus();
                    return(true, rDt);
                }
            }
            if (sTextBox.E132Multi)
            {
                string result = string.Empty;
                switch (sTextBox.E132Type)
                {
                case "M_Shouhin":
                    ShouhinBL shouhin = new ShouhinBL();
                    rDt    = shouhin.Shouhin_Check(sTextBox.ctrlE132_1.Text, sTextBox.ctrlE132_2.Text, sTextBox.ctrlE132_3.Text, sTextBox.ctrlE132_4.Text, string.Empty);
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;
                }
                if (result.Equals("E132"))
                {
                    ShowErrorMessage("E132");
                    sTextBox.Focus();
                    return(true, rDt);
                }
            }
            if (sTextBox.E133)
            {
                DataTable dt     = new DataTable();
                string    result = string.Empty;
                StaffBL   sBL    = new StaffBL();
                switch (sTextBox.E133Type)
                {
                case "M_Staff":
                    if (!string.IsNullOrEmpty(sTextBox.ctrlE133_1.Text) && !string.IsNullOrEmpty(sTextBox.ctrlE133_2.Text))
                    {
                        dt     = sBL.Staff_Select_Check(sTextBox.ctrlE133_1.Text, sTextBox.ctrlE133_2.Text, string.Empty);
                        rDt    = dt;
                        result = dt.Rows[0]["MessageID"].ToString();
                    }
                    break;

                case "M_Siiresaki":
                    if (!string.IsNullOrEmpty(sTextBox.ctrlE133_1.Text) && !string.IsNullOrEmpty(sTextBox.ctrlE133_2.Text))
                    {
                        SiiresakiBL obj = new SiiresakiBL();
                        dt     = obj.Siiresaki_Select_Check(sTextBox.ctrlE133_1.Text, sTextBox.ctrlE133_2.Text, string.Empty);
                        rDt    = dt;
                        result = dt.Rows[0]["MessageID"].ToString();
                    }
                    break;

                case "M_Tokuisaki":
                    if (!string.IsNullOrEmpty(sTextBox.ctrlE133_1.Text) && !string.IsNullOrEmpty(sTextBox.ctrlE133_2.Text))
                    {
                        TokuisakiBL tokuisakiBL = new TokuisakiBL();
                        dt     = tokuisakiBL.M_Tokuisaki_Select(sTextBox.ctrlE133_1.Text, sTextBox.ctrlE133_2.Text, string.Empty);
                        rDt    = dt;
                        result = dt.Rows[0]["MessageID"].ToString();
                    }
                    break;

                case "M_Kouriten":
                    if (!string.IsNullOrEmpty(sTextBox.ctrlE133_1.Text) && !string.IsNullOrEmpty(sTextBox.ctrlE133_2.Text))
                    {
                        KouritenBL objK = new KouritenBL();
                        dt     = objK.Kouriten_Select_Check(sTextBox.ctrlE133_1.Text, sTextBox.ctrlE133_2.Text, string.Empty, sTextBox.ctrlE133_3.Text);
                        rDt    = dt;
                        result = dt.Rows[0]["MessageID"].ToString();
                    }
                    break;

                case "denpyou":
                    DenpyouNOEntity denpyou_entity = new DenpyouNOEntity();
                    DenpyouNOBL     denpyou_bl     = new DenpyouNOBL();
                    denpyou_entity.RenbenKBN = sTextBox.ctrl_combo.SelectedValue.ToString();
                    denpyou_entity.seqno     = sTextBox.ctrlE133_2.Text;
                    denpyou_entity.prefix    = sTextBox.ctrlE133_1.Text;
                    denpyou_entity.MessageID = "E133";
                    rDt    = denpyou_bl.DenpyouNO_Check(denpyou_entity);
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "ChakuniNyuuryoku":
                    chakuniNyuuryoku_BL cbl = new chakuniNyuuryoku_BL();
                    dt     = cbl.ChakuniNyuuryoku_Select(sTextBox.ctrlE133_1.Text, string.Empty, "E133");
                    rDt    = dt;
                    result = dt.Rows[0]["MessageID"].ToString();
                    break;

                case "ChakuniYotei":
                    chakuniNyuuryoku_BL bl = new chakuniNyuuryoku_BL();
                    dt     = bl.ChakuniNyuuryoku_Select(sTextBox.ctrlE133_1.Text, string.Empty, "E133");
                    rDt    = dt;
                    result = dt.Rows[0]["MessageID"].ToString();
                    break;

                case "ChakuniYoteiNyuuryoku":
                    ChakuniYoteiNyuuryoku_BL cybl = new ChakuniYoteiNyuuryoku_BL();
                    dt     = cybl.ChakuniYoteiNyuuryoku_Select(sTextBox.ctrlE133_1.Text, string.Empty, "E133");
                    rDt    = dt;
                    result = dt.Rows[0]["MessageID"].ToString();
                    break;

                case "JuchuuNyuuryoku":
                    if (!string.IsNullOrEmpty(sTextBox.ctrlE133_1.Text))
                    {
                        JuchuuListBL jbl = new JuchuuListBL();
                        rDt    = jbl.JuchuuNyuuryoku_Select_Check(sTextBox.ctrlE133_1.Text, string.Empty, string.Empty);
                        result = rDt.Rows[0]["MessageID"].ToString();
                    }
                    break;

                case "ShukkaSiziNyuuryoku":
                    ShukkasiziNyuuryokuBL skszbl = new ShukkasiziNyuuryokuBL();
                    rDt    = skszbl.ShukkasiziNyuuryoku_ErrorCheck(sTextBox.ctrlE133_1.Text, "E133");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "ShukkaNyuuryoku":
                    ShukkaNyuuryokuBL sbl = new ShukkaNyuuryokuBL();
                    rDt    = sbl.ShukkaNyuuryoku_Select_Check(sTextBox.ctrlE133_1.Text, string.Empty, "E133");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "HikiateHenkouShoukai":
                    if (!string.IsNullOrEmpty(sTextBox.ctrlE133_1.Text.Trim()))
                    {
                        HikiateHenkouShoukaiBL hikiateHenkouShoukaiBL = new HikiateHenkouShoukaiBL();
                        rDt    = hikiateHenkouShoukaiBL.Error_Check(sTextBox.ctrlE133_1.Text, string.Empty, "E133");
                        result = rDt.Rows[0]["MessageID"].ToString();
                    }
                    break;

                case "IdouNyuuryoku":
                    if (!string.IsNullOrEmpty(sTextBox.ctrlE133_1.Text))
                    {
                        string errType = string.Empty;
                        if (sTextBox.ctrlE133_1.Name.Contains("Copy"))
                        {
                            errType = "Copy";
                        }
                        IdouNyuuryokuBL ibl = new IdouNyuuryokuBL();
                        rDt    = ibl.IdouNyuuryoku_Select_Check(sTextBox.ctrlE133_1.Text, string.Empty, errType);
                        result = rDt.Rows[0]["MessageID"].ToString();
                    }
                    break;

                case "HacchuuNyuuryoku":
                    if (!string.IsNullOrEmpty(sTextBox.ctrlE133_1.Text))
                    {
                        string errType = string.Empty;
                        if (sTextBox.ctrlE133_1.Name.Contains("Copy"))
                        {
                            errType = "Copy";
                        }
                        HacchuuNyuuryokuBL h_bl = new HacchuuNyuuryokuBL();
                        rDt    = h_bl.HacchuuNyuuryoku_Select_Check(sTextBox.ctrlE133_1.Text, string.Empty, errType);
                        result = rDt.Rows[0]["MessageID"].ToString();
                    }
                    break;
                }
                if (result.Equals("E133"))
                {
                    ShowErrorMessage("E133");
                    sTextBox.Focus();
                    return(true, rDt);
                }
            }
            if (sTextBox.E133Multi)
            {
                string result = string.Empty;
                switch (sTextBox.E133Type)
                {
                case "M_Shouhin":
                    if (!string.IsNullOrWhiteSpace(sTextBox.ctrlE133_1.Text) && !string.IsNullOrWhiteSpace(sTextBox.ctrlE133_2.Text))
                    {
                        ShouhinBL shouhin = new ShouhinBL();
                        rDt    = shouhin.Shouhin_Check(sTextBox.ctrlE133_1.Text, sTextBox.ctrlE133_2.Text, sTextBox.ctrlE133_3.Text, sTextBox.ctrlE133_4.Text, string.Empty);
                        result = rDt.Rows[0]["MessageID"].ToString();
                    }
                    break;
                }
                if (result.Equals("E133"))
                {
                    ShowErrorMessage("E133");
                    sTextBox.Focus();
                    return(true, rDt);
                }
            }
            if (sTextBox.E135)
            {
                string result = string.Empty;
                switch (sTextBox.E135Type)
                {
                case "M_Staff":
                    if (!string.IsNullOrEmpty(sTextBox.ctrlE135_1.Text) && !string.IsNullOrEmpty(sTextBox.ctrlE135_2.Text))
                    {
                        StaffBL bl = new StaffBL();
                        rDt    = bl.Staff_Select_Check(sTextBox.ctrlE135_1.Text, sTextBox.ctrlE135_2.Text, "E135");
                        result = rDt.Rows[0]["MessageID"].ToString();
                    }
                    break;
                }
                if (result.Equals("E135"))
                {
                    ShowErrorMessage("E135");
                    sTextBox.Focus();
                    return(true, rDt);
                }
            }
            if (sTextBox.E159)
            {
                string result = string.Empty;
                switch (sTextBox.E159Type)
                {
                case "ChakuniNyuuryoku":
                    chakuniNyuuryoku_BL cbl = new chakuniNyuuryoku_BL();
                    rDt    = cbl.ChakuniNyuuryoku_Select(sTextBox.ctrlE159_1.Text, string.Empty, "E159");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "ShukkaSiziNyuuryoku":
                    ShukkasiziNyuuryokuBL skszbl = new ShukkasiziNyuuryokuBL();
                    rDt    = skszbl.ShukkasiziNyuuryoku_ErrorCheck(sTextBox.ctrlE159_1.Text, "E159");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;
                }
                if (result.Equals("E159"))
                {
                    ShowErrorMessage("E159");
                    sTextBox.Focus();
                    return(true, rDt);
                }
            }
            if (sTextBox.E160)
            {
                string result = string.Empty;
                switch (sTextBox.E160Type)
                {
                case "ChakuniYoteiNyuuryoku":
                    ChakuniYoteiNyuuryoku_BL cybl = new ChakuniYoteiNyuuryoku_BL();
                    rDt    = cybl.ChakuniYoteiNyuuryoku_Select(sTextBox.ctrlE160_1.Text, string.Empty, "E160");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "JuchuuNyuuryoku":
                    JuchuuListBL jbl = new JuchuuListBL();
                    rDt    = jbl.JuchuuNyuuryoku_Select_Check(sTextBox.ctrlE160_1.Text, string.Empty, "E160");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "ShukkaSiziNyuuryoku":
                    ShukkasiziNyuuryokuBL skszbl = new ShukkasiziNyuuryokuBL();
                    rDt    = skszbl.ShukkasiziNyuuryoku_ErrorCheck(sTextBox.ctrlE160_1.Text, "E160");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "ShukkaNyuuryoku":
                    ShukkaNyuuryokuBL sbl = new ShukkaNyuuryokuBL();
                    rDt    = sbl.ShukkaNyuuryoku_Select_Check(sTextBox.ctrlE160_1.Text, string.Empty, "E160");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "JuchuuTorikomi":
                    JuchuuTorikomiBL jubl = new JuchuuTorikomiBL();
                    rDt    = jubl.JuchuuTorikomi_Error_Check(sTextBox.ctrlE160_1.Text, "E160");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;
                }
                if (result.Equals("E160"))
                {
                    ShowErrorMessage("E160");
                    sTextBox.Focus();
                    return(true, rDt);
                }
            }
            if (sTextBox.E165)
            {
                string result = string.Empty;
                switch (sTextBox.E165Type)
                {
                case "ShukkaTorikom":
                    ShukkaTorikomi_BL sbl = new ShukkaTorikomi_BL();
                    rDt    = sbl.ShukkaTorikomi_Error_Check(sTextBox.ctrlE165_1.Text, "E165");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "ShukkaNyuuryoku":
                    ShukkaNyuuryokuBL skbl = new ShukkaNyuuryokuBL();
                    rDt    = skbl.ShukkaNyuuryoku_Select_Check(sTextBox.ctrlE165_1.Text, string.Empty, "E165");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;
                }
                if (result.Equals("E165"))
                {
                    bbl.ShowMessage("E165");
                    sTextBox.Focus();
                    return(true, rDt);
                }
            }
            if (sTextBox.E166)
            {
                if (!sTextBox.ctrlE166_1.Text.Equals(sTextBox.ctrlE166_2.Text))
                {
                    ShowErrorMessage("E166");
                    sTextBox.Focus();
                    return(true, rDt);
                }
            }
            if (sTextBox.E227)
            {
                string result = string.Empty;
                switch (sTextBox.E227Type)
                {
                case "M_Tokuisaki":
                    TokuisakiBL t_bl = new TokuisakiBL();
                    rDt    = t_bl.M_Tokuisaki_Select(sTextBox.ctrlE227_1.Text, sTextBox.ctrlE227_2.Text, "E227");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "M_Kouriten":
                    KouritenBL k_bl = new KouritenBL();
                    rDt    = k_bl.Kouriten_Select_Check(sTextBox.ctrlE227_1.Text, sTextBox.ctrlE227_2.Text, "E227");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "M_Siiresaki":
                    SiiresakiBL obj = new SiiresakiBL();
                    rDt    = obj.Siiresaki_Select_Check(sTextBox.ctrlE227_1.Text, sTextBox.ctrlE227_2.Text, "E227");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;
                }
                if (result.Equals("E227"))
                {
                    bbl.ShowMessage("E227", "取引終了日");
                    sTextBox.Focus();
                    return(true, rDt);
                }
            }
            if (sTextBox.E265)
            {
                string result = string.Empty;
                switch (sTextBox.E265Type)
                {
                case "HacchuuNyuuryoku":
                    HacchuuNyuuryokuBL H_bl = new HacchuuNyuuryokuBL();
                    rDt    = H_bl.HacchuuNyuuryoku_Select_Check(sTextBox.ctrlE266_1.Text, string.Empty, "E265");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "JuchuuTorikomi":
                    JuchuuTorikomiBL jubl = new JuchuuTorikomiBL();
                    rDt    = jubl.JuchuuTorikomi_Error_Check(sTextBox.ctrlE265_1.Text, "E265");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "JuchuuNyuuryoku":
                    JuchuuListBL jbl = new JuchuuListBL();
                    rDt    = jbl.JuchuuNyuuryoku_Select_Check(sTextBox.ctrlE265_1.Text, string.Empty, "E265");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;
                }
                if (result.Equals("E265"))
                {
                    bbl.ShowMessage("E265");
                    sTextBox.Focus();
                    return(true, rDt);
                }
            }
            if (sTextBox.E266)
            {
                string result = string.Empty;
                switch (sTextBox.E266Type)
                {
                case "HacchuuNyuuryoku":
                    HacchuuNyuuryokuBL H_bl = new HacchuuNyuuryokuBL();
                    rDt    = H_bl.HacchuuNyuuryoku_Select_Check(sTextBox.ctrlE266_1.Text, string.Empty, "E266");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;
                }
                if (result.Equals("E266"))
                {
                    bbl.ShowMessage("E266");
                    sTextBox.Focus();
                    return(true, rDt);
                }
            }
            if (sTextBox.E267)
            {
                string result = string.Empty;
                switch (sTextBox.E267Type)
                {
                case "M_Tokuisaki":
                    TokuisakiBL t_bl = new TokuisakiBL();
                    rDt    = t_bl.M_Tokuisaki_Select(sTextBox.ctrlE267_1.Text, sTextBox.ctrlE267_2.Text, "E267");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "M_Kouriten":
                    KouritenBL k_bl = new KouritenBL();
                    rDt    = k_bl.Kouriten_Select_Check(sTextBox.ctrlE267_1.Text, sTextBox.ctrlE267_2.Text, "E267");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "M_Siiresaki":
                    SiiresakiBL obj = new SiiresakiBL();
                    rDt    = obj.Siiresaki_Select_Check(sTextBox.ctrlE267_1.Text, sTextBox.ctrlE267_2.Text, "E267");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;
                }
                if (result.Equals("E267"))
                {
                    bbl.ShowMessage("E267", "取引開始日");
                    sTextBox.Focus();
                    return(true, rDt);
                }
            }
            if (sTextBox.E268)
            {
                string    result = string.Empty;
                DataTable dt     = new DataTable();
                switch (sTextBox.E268Type)
                {
                case "ChakuniNyuuryoku":
                    chakuniNyuuryoku_BL cbl = new chakuniNyuuryoku_BL();
                    rDt    = cbl.ChakuniNyuuryoku_Select(sTextBox.ctrlE268_1.Text, string.Empty, "E268");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "ChakuniYotei":
                    chakuniNyuuryoku_BL bl = new chakuniNyuuryoku_BL();
                    rDt    = bl.ChakuniNyuuryoku_ErrorCheck(sTextBox.ctrlE268_1.Text, string.Empty, "E268");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "ChakuniYoteiNyuuryoku":
                    ChakuniYoteiNyuuryoku_BL cybl = new ChakuniYoteiNyuuryoku_BL();
                    rDt    = cybl.ChakuniYoteiNyuuryoku_Select(sTextBox.ctrlE268_1.Text, string.Empty, "E268");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;
                }
                if (result.Equals("E268"))
                {
                    ShowErrorMessage("E268");
                    sTextBox.Focus();
                    return(true, rDt);
                }
            }
            if (sTextBox.E270)
            {
                string result = string.Empty;
                switch (sTextBox.E270Type)
                {
                case "souko":
                    if (!string.IsNullOrEmpty(sTextBox.ctrlE270_1.Text))
                    {
                        SoukoBL sBL = new SoukoBL();
                        rDt    = sBL.Souko_Select(sTextBox.ctrlE270_1.Text, "E270");
                        result = rDt.Rows[0]["MessageID"].ToString();
                    }
                    break;

                case "M_Staff":
                    if (!string.IsNullOrEmpty(sTextBox.ctrlE270_1.Text) && !string.IsNullOrEmpty(sTextBox.ctrlE270_2.Text))
                    {
                        StaffBL sBL = new StaffBL();
                        rDt    = sBL.Staff_Select_Check(sTextBox.ctrlE270_1.Text, sTextBox.ctrlE270_2.Text, "E270");
                        result = rDt.Rows[0]["MessageID"].ToString();
                    }
                    break;

                case "M_Siiresaki":
                    if (!string.IsNullOrEmpty(sTextBox.ctrlE270_1.Text) && !string.IsNullOrEmpty(sTextBox.ctrlE270_2.Text))
                    {
                        SiiresakiBL obj = new SiiresakiBL();
                        rDt    = obj.Siiresaki_Select_Check(sTextBox.ctrlE270_1.Text, sTextBox.ctrlE270_2.Text, "E270");
                        result = rDt.Rows[0]["MessageID"].ToString();
                    }
                    break;

                case "M_Tokuisaki":
                    if (!string.IsNullOrEmpty(sTextBox.ctrlE270_1.Text) && !string.IsNullOrEmpty(sTextBox.ctrlE270_2.Text))
                    {
                        TokuisakiBL tBL = new TokuisakiBL();
                        rDt    = tBL.M_Tokuisaki_Select(sTextBox.ctrlE270_1.Text, sTextBox.ctrlE270_2.Text, "E270");
                        result = rDt.Rows[0]["MessageID"].ToString();
                    }
                    break;

                case "M_Kouriten":
                    if (!string.IsNullOrEmpty(sTextBox.ctrlE270_1.Text) && !string.IsNullOrEmpty(sTextBox.ctrlE270_2.Text))
                    {
                        KouritenBL objK = new KouritenBL();
                        rDt    = objK.Kouriten_Select_Check(sTextBox.ctrlE270_1.Text, sTextBox.ctrlE270_2.Text, "E270", sTextBox.ctrlE270_3.Text);
                        result = rDt.Rows[0]["MessageID"].ToString();
                    }
                    break;
                }
                if (result.Equals("E270"))
                {
                    ShowErrorMessage("E270");
                    sTextBox.Focus();
                    return(true, rDt);
                }
            }
            if (sTextBox.E270Multi)
            {
                string result = string.Empty;
                switch (sTextBox.E270Type)
                {
                case "M_Shouhin":
                    if (!string.IsNullOrWhiteSpace(sTextBox.ctrlE270_1.Text) && !string.IsNullOrWhiteSpace(sTextBox.ctrlE270_2.Text))
                    {
                        ShouhinBL shouhin = new ShouhinBL();
                        rDt    = shouhin.Shouhin_Check(sTextBox.ctrlE270_1.Text, sTextBox.ctrlE270_2.Text, sTextBox.ctrlE270_3.Text, sTextBox.ctrlE270_4.Text, "E270");
                        result = rDt.Rows[0]["MessageID"].ToString();
                    }
                    break;
                }
                if (result.Equals("E270"))
                {
                    ShowErrorMessage("E270");
                    sTextBox.Focus();
                    return(true, rDt);
                }
            }

            //HET
            if (sTextBox.E279)
            {
                switch (sTextBox.E279Type)
                {
                case "IdouNyuuryoku":
                    if (sTextBox.ctrlE279_1.Text.ToString() == "3" && sTextBox.ctrlE279_2.Text.ToString() == sTextBox.ctrlE279_3.Text.ToString())
                    {
                        sTextBox.Focus();
                        bbl.ShowMessage("E279");
                        return(true, rDt);
                    }
                    break;
                }
            }
            if (sTextBox.E280)
            {
                string result = string.Empty;
                switch (sTextBox.E280Type)
                {
                case "ChakuniNyuuryoku":
                    chakuniNyuuryoku_BL bl = new chakuniNyuuryoku_BL();
                    rDt    = bl.ChakuniNyuuryoku_Select(sTextBox.ctrlE280_1.Text, string.Empty, "E280");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "ShukkaSiziNyuuryoku":
                    ShukkasiziNyuuryokuBL skszbl = new ShukkasiziNyuuryokuBL();
                    rDt    = skszbl.ShukkasiziNyuuryoku_ErrorCheck(sTextBox.ctrlE280_1.Text, "E280");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;

                case "ShukkaNyuuryoku":
                    ShukkaNyuuryokuBL sbl = new ShukkaNyuuryokuBL();
                    rDt    = sbl.ShukkaNyuuryoku_Select_Check(sTextBox.ctrlE280_1.Text, string.Empty, "E280");
                    result = rDt.Rows[0]["MessageID"].ToString();
                    break;
                }
                if (result.Equals("E280"))
                {
                    ShowErrorMessage("E280");
                    sTextBox.Focus();
                    return(true, rDt);
                }
            }

            if (sTextBox.E128)
            {
                if (!System.IO.File.Exists(sTextBox.ctrlE128_1.Text) && !string.IsNullOrEmpty(sTextBox.ctrlE128_1.Text.Trim()))
                {
                    sTextBox.Focus();
                    sTextBox.ctrlE128_2.ImageLocation = "";
                    sTextBox.ctrlE128_2.Image         = null;
                    bbl.ShowMessage("E128");
                    return(true, rDt);
                }
            }
            if (sTextBox.CYuubin_Juusho)
            {
                if (!string.IsNullOrEmpty(sTextBox.ctrl1Yuubin_Juusho.Text) && !string.IsNullOrEmpty(sTextBox.ctrl2Yuubin_Juusho.Text))
                {
                    if ((sTextBox.ctrl1Yuubin_Juusho.Text != sTextBox.check1Yuubin_Juusho || sTextBox.ctrl2Yuubin_Juusho.Text != sTextBox.check2Yuubin_Juusho))
                    {
                        YuubinNOBL     obj    = new YuubinNOBL();
                        YuubinNOEntity entity = new YuubinNOEntity();
                        entity.YuubinNO1 = sTextBox.ctrl1Yuubin_Juusho.Text;
                        entity.YuubinNO2 = sTextBox.ctrl2Yuubin_Juusho.Text;
                        rDt = obj.Yuubin_Search(entity);
                    }
                }
            }
            return(false, rDt);
        }