Example #1
0
 private void ScBankCD_CodeKeyDownEvent(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         if (!string.IsNullOrWhiteSpace(ScBankCD.TxtCode.Text))
         {
             if (ScBankCD.SelectData())
             {
                 ScBranchCD.Value1 = ScBankCD.TxtCode.Text;
                 ScBranchCD.Value2 = ScBankCD.LabelText;
                 mb = GetDate();
                 mb = mtbstbl.M_Bank_ChangeDate_Select(mb);
                 if (mb != null)
                 {
                     date = mb.ChangeDate;
                 }
             }
             else
             {
                 mtbstbl.ShowMessage("E101");
                 ScBankCD.SetFocus(1);
             }
         }
     }
 }
Example #2
0
        private void ChangeMode(EOperationMode OperationMode)
        {
            base.OperationMode = OperationMode;
            switch (OperationMode)
            {
            case EOperationMode.INSERT:
                Clear(PanelHeader);
                Clear(PanelDetail);
                EnablePanel(PanelHeader);
                DisablePanel(PanelDetail);
                ScBranchCD.SearchEnable = false;
                F9Visible          = false;
                F12Enable          = true;
                btnDisplay.Enabled = F11Enable = true;
                break;

            case EOperationMode.UPDATE:
            case EOperationMode.DELETE:
            case EOperationMode.SHOW:
                Clear(PanelHeader);
                Clear(PanelDetail);
                EnablePanel(PanelHeader);
                ScBranchCD.SearchEnable = true;
                DisablePanel(PanelCopy);
                DisablePanel(PanelDetail);
                F12Enable          = false;
                btnDisplay.Enabled = F11Enable = true;
                break;
            }
            ScBankCD.SetFocus(1);
        }
Example #3
0
        private void FormLoadEvent(object sender, EventArgs e)
        {
            InProgramID = Application.ProductName;
            mtbstbl     = new MasterTouroku_GinkouShiten_BL();
            SetFunctionLabel(EProMode.MENTE);
            StartProgram();
            SetRequireField();
            SelectNextControl(PanelDetail, true, true, true, true);

            ScBankCD.SetFocus(1);
        }
Example #4
0
        private void InsertUpdate(int mode)
        {
            //*** Insert Update Function
            if (mtbstbl.M_BankShiten_InsertUpdate(mbste, mode))
            {
                Clear(PanelHeader);
                Clear(PanelDetail);

                ChangeMode(OperationMode);
                ScBankCD.SetFocus(1);
                //show message==>I101
                mtbstbl.ShowMessage("I101");
            }
            else
            {
                mtbstbl.ShowMessage("S001");
            }
        }
 private void ScBankCD_CodeKeyDownEvent(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         if (!string.IsNullOrWhiteSpace(ScBankCD.TxtCode.Text))
         {
             if (ScBankCD.SelectData())
             {
                 ScBranchCD.Value1 = ScBankCD.TxtCode.Text;
                 ScBranchCD.Value2 = ScBankCD.LabelText;
             }
             else
             {
                 mtbbl.ShowMessage("E101");
                 ScBankCD.SetFocus(1);
             }
         }
     }
 }
Example #6
0
        public override void FunctionProcess(int index)
        {
            CKM_SearchControl sc = new CKM_SearchControl();

            mtbstbl = new MasterTouroku_GinkouShiten_BL();
            switch (index + 1)
            {
            case 2:
                ChangeMode(EOperationMode.INSERT);
                break;

            case 3:
                ChangeMode(EOperationMode.UPDATE);
                break;

            case 4:
                ChangeMode(EOperationMode.DELETE);
                break;

            case 5:
                ChangeMode(EOperationMode.SHOW);
                break;

            case 6:
                if (bbl.ShowMessage("Q004") == DialogResult.Yes)
                {
                    ChangeMode(OperationMode);
                    ScBankCD.SetFocus(1);
                }
                break;

            case 11:
                F11();
                break;

            case 12:
                F12();
                break;
            }
        }
        private bool ErrorCheck(int index)
        {
            mtbbl = new MasterTouroku_GinkouKouza_BL();
            if (index == 11)
            {
                //HeaderCheck on F11
                if (OperationMode == EOperationMode.INSERT)
                {
                    if (type == 1)
                    {
                        if (!RequireCheck(new Control[] { ScKouzaCD.TxtCode, ScKouzaCD.TxtChangeDate }))   //,ScCopyKouzaCD.TxtCode,ScCopyKouzaCD.TxtChangeDate
                        {
                            return(false);
                        }
                    }


                    else
                    {
                        if (!RequireCheck(new Control[] { ScKouzaCD.TxtCode, ScKouzaCD.TxtChangeDate }))
                        {
                            return(false);
                        }
                        if (!RequireCheck(new Control[] { ScCopyKouzaCD.TxtCode }, ScCopyKouzaCD.TxtChangeDate))
                        {
                            return(false);
                        }

                        if (!RequireCheck(new Control[] { ScCopyKouzaCD.TxtChangeDate }, ScCopyKouzaCD.TxtCode))
                        {
                            return(false);
                        }

                        if (ScKouzaCD.IsExists(1))
                        {
                            mtbbl.ShowMessage("E132");
                            ScKouzaCD.SetFocus(1);
                            return(false);
                        }

                        if (!string.IsNullOrWhiteSpace(ScCopyKouzaCD.TxtCode.Text) && !string.IsNullOrWhiteSpace(ScCopyKouzaCD.TxtChangeDate.Text))
                        {
                            if (!ScCopyKouzaCD.IsExists(1))
                            {
                                mtbbl.ShowMessage("E133");
                                ScCopyKouzaCD.SetFocus(1);
                                return(false);
                            }
                        }
                    }
                }
                else
                {
                    if (!ScKouzaCD.IsExists(1))
                    {
                        mtbbl.ShowMessage("E133");
                        ScKouzaCD.SetFocus(1);
                        return(false);
                    }
                }
            }
            else if (index == 12)
            {
                if (!RequireCheck(new Control[] { ScKouzaCD.TxtCode, ScKouzaCD.TxtChangeDate }))
                {
                    return(false);
                }
                if (OperationMode == EOperationMode.INSERT)
                {
                    if (ScKouzaCD.IsExists(1))
                    {
                        mtbbl.ShowMessage("E132");
                        ScKouzaCD.SetFocus(1);
                        return(false);
                    }
                }

                if (!RequireCheck(new Control[] { txtKouzaName }))
                {
                    return(false);
                }
                if (!RequireCheck(new Control[] { ScBankCD.TxtCode }))
                {
                    return(false);
                }
                if (!ScBankCD.IsExists(2))
                {
                    mtbbl.ShowMessage("E101");
                    ScBankCD.SetFocus(1);
                    return(false);
                }

                if (!RequireCheck(new Control[] { ScBranchCD.TxtCode }))
                {
                    return(false);
                }
                if (!ScBranchCD.IsExists(2))
                {
                    mtbbl.ShowMessage("E101");
                    ScBranchCD.SetFocus(1);
                    return(false);
                }

                if (!RequireCheck(new Control[] { txtKouzaKBN }))
                {
                    return(false);
                }

                if (txtKouzaKBN.Text != "1" && txtKouzaKBN.Text != "2")
                {
                    mtbbl.ShowMessage("E101");
                    ScBankCD.SetFocus(1);
                    return(false);
                }

                if (!RequireCheck(new Control[] { txtKouzaNO, txtKouzaMeigi }))
                {
                    return(false);
                }
                if (!RequireCheck(new Control[] { txtCompanyName }, txtCompanyCD))
                {
                    return(false);
                }
                if (!RequireCheck(new Control[] { txtTax11 }, txtFee11))
                {
                    return(false);
                }
                if (!ReverseRequireCheck(new Control[] { txtFee12 }, txtAmount1))
                {
                    return(false);
                }
                if (!RequireCheck(new Control[] { txtTax12 }, txtFee12))
                {
                    return(false);
                }
                if (!RequireCheck(new Control[] { txtTax21 }, txtFee21))
                {
                    return(false);
                }
                if (!RequireCheck(new Control[] { txtFee22 }, txtAmount2))
                {
                    return(false);
                }
                if (!RequireCheck(new Control[] { txtTax22 }, txtFee22))
                {
                    return(false);
                }
                if (!RequireCheck(new Control[] { txtTax31 }, txtFee31))
                {
                    return(false);
                }
                if (!RequireCheck(new Control[] { txtFee32 }, txtAmount3))
                {
                    return(false);
                }
                if (!RequireCheck(new Control[] { txtTax32 }, txtFee32))
                {
                    return(false);
                }
            }
            return(true);
        }
Example #8
0
        private bool ErrorCheck(int index)
        {
            if (index == 11)
            {
                //HeaderCheck on F11
                if (OperationMode == EOperationMode.INSERT)
                {
                    if (type == 1)                                                                                           //New
                    {
                        if (!RequireCheck(new Control[] { ScBankCD.TxtCode, ScBranchCD.TxtCode, ScBranchCD.TxtChangeDate })) //E102
                        {
                            return(false);
                        }

                        if ((Convert.ToDateTime(ScBranchCD.ChangeDate)) < (Convert.ToDateTime(date)))
                        {
                            bbl.ShowMessage("E133");
                            ScBankCD.SetFocus(1);
                            return(false);
                        }


                        if (!ScBankCD.IsExists(2))
                        {
                            mtbstbl.ShowMessage("E133");
                            ScBankCD.SetFocus(1);
                            return(false);
                        }

                        if (ScBranchCD.IsExists(1))
                        {
                            //***show Message mtsbl.ShowMessage("E132");
                            mtbstbl.ShowMessage("E132");
                            ScBranchCD.SetFocus(1);
                            return(false);
                        }
                    }
                    else//Copy
                    {
                        //if (!RequireCheck(new Control[] { ScBankCD.TxtCode,ScBranchCD.TxtCode, ScBranchCD.TxtChangeDate,ScCopyBankCD.TxtCode,ScCopyBranchCD.TxtCode,ScCopyBranchCD.TxtChangeDate }))

                        if (!RequireCheck(new Control[] { ScBankCD.TxtCode, ScBranchCD.TxtCode, ScBranchCD.TxtChangeDate }))
                        {
                            return(false);
                        }

                        if (!RequireCheck(new Control[] { ScCopyBankCD.TxtCode }, ScCopyBranchCD.TxtCode))
                        {
                            return(false);
                        }

                        if (!RequireCheck(new Control[] { ScCopyBranchCD.TxtCode }, ScCopyBranchCD.TxtChangeDate))
                        {
                            return(false);
                        }

                        if (!RequireCheck(new Control[] { ScCopyBranchCD.TxtChangeDate }, ScCopyBranchCD.TxtCode))
                        {
                            return(false);
                        }
                        if ((Convert.ToDateTime(ScBranchCD.ChangeDate)) < (Convert.ToDateTime(date)))
                        {
                            bbl.ShowMessage("E133");
                            ScBankCD.SetFocus(1);
                            return(false);
                        }

                        if (!ScBankCD.IsExists(2))
                        {
                            mtbstbl.ShowMessage("E133");
                            ScBankCD.SetFocus(1);
                            return(false);
                        }
                        if (ScBranchCD.IsExists(1))
                        {
                            //***show Message mtsbl.ShowMessage("E132");
                            mtbstbl.ShowMessage("E132");
                            ScBranchCD.SetFocus(1);
                            return(false);
                        }

                        if (!string.IsNullOrWhiteSpace(ScCopyBranchCD.TxtCode.Text) && !string.IsNullOrWhiteSpace(ScCopyBranchCD.TxtChangeDate.Text))
                        {
                            if (!ScCopyBranchCD.IsExists(1))
                            {
                                //*** show Message mtsbl.ShowMessage("E133");
                                mtbstbl.ShowMessage("E133");
                                ScCopyBranchCD.SetFocus(1);
                                return(false);
                            }
                        }
                    }
                }
                else
                {
                    if (!RequireCheck(new Control[] { ScBankCD.TxtCode, ScBranchCD.TxtCode, ScBranchCD.TxtChangeDate }))
                    {
                        return(false);
                    }

                    //if (!string.IsNullOrWhiteSpace(ScCopyBranchCD.TxtCode.Text) && !string.IsNullOrWhiteSpace(ScCopyBranchCD.TxtChangeDate.Text))
                    //{
                    //    if (!ScBranchCD.IsExists(1))
                    //    {
                    //        //*** Show Message mtsbl.ShowMessage("E133");
                    //        mtbstbl.ShowMessage("E133");
                    //        ScBranchCD.SetFocus(1);
                    //        return false;
                    //    }
                    //}
                }
            }
            else if (index == 12)
            {
                if (!RequireCheck(new Control[] { ScBranchCD.TxtCode, ScBranchCD.TxtChangeDate }))
                {
                    return(false);
                }

                if (OperationMode == EOperationMode.INSERT)
                {
                    if ((Convert.ToDateTime(ScBranchCD.ChangeDate)) < (Convert.ToDateTime(date)))
                    {
                        bbl.ShowMessage("E133");
                        ScBankCD.SetFocus(1);
                        return(false);
                    }

                    //DataTable dtResult = bbl.SimpleSelect1("4", ScBranchCD.ChangeDate, ScBankCD.TxtCode.Text);
                    //if (dtResult.Rows.Count < 1)
                    //{
                    //    bbl.ShowMessage("E133");
                    //    ScBankCD.SetFocus(1);
                    //    return false;
                    //}
                    if (!ScBankCD.IsExists(2))
                    {
                        mtbstbl.ShowMessage("E133");
                        ScBankCD.SetFocus(1);
                        return(false);
                    }
                    if (ScBranchCD.IsExists(1))
                    {
                        //***show Message mtsbl.ShowMessage("E132");
                        mtbstbl.ShowMessage("E132");
                        ScBranchCD.SetFocus(1);
                        return(false);
                    }
                }

                if (!RequireCheck(new Control[] { TxtBankBranchName, TxtKanaName }))
                {
                    return(false);
                }
                if (OperationMode == EOperationMode.DELETE)
                {
                    if (ScBranchCD.IsExistsDeleteCheck())
                    {
                        //Show Message ==>E154
                        mtbstbl.ShowMessage("E154");
                        ScBranchCD.SetFocus(1);
                        return(false);
                    }
                }
                //*** Insert Other Error Check
            }
            return(true);
        }