示例#1
0
        private void ToolsStatus()
        {
            if (_TypeOperation == ClassPublicVar.TypeOperation.Show)
            {
                TextBoxID.ReadOnly          = true;
                TextBoxGroupID.ReadOnly     = true;
                TextBoxGroupName.ReadOnly   = true;
                TextBoxNameLng1.ReadOnly    = true;
                TextBoxNameLng2.ReadOnly    = true;
                TextBoxAddress.ReadOnly     = true;
                TextBoxCity.ReadOnly        = true;
                TextBoxEmail.ReadOnly       = true;
                TextBoxTelephone1.ReadOnly  = true;
                TextBoxTelephone2.ReadOnly  = true;
                TextBoxFax.ReadOnly         = true;
                TextBoxMobile.ReadOnly      = true;
                TextBoxCreditLimit.ReadOnly = true;
                TextBoxDebitTrans.ReadOnly  = true;
                TextBoxCreditTrans.ReadOnly = true;
                TextBoxBalance.ReadOnly     = true;


                ButtonNew.Enabled    = true;
                ButtonEdit.Enabled   = true;
                ButtonSave.Enabled   = false;
                ButtonDelete.Enabled = true;
                ButtonPrint.Enabled  = true;
                ButtonSearch.Enabled = true;
                ButtonCancel.Enabled = false;
                ButtonExit.Enabled   = true;

                TreeViewMain.Enabled      = true;
                RadioBtnGroup.Enabled     = false;
                RadioBtnNotGroup.Enabled  = false;
                buttonGroupSearch.Enabled = false;

                ButtonExit.Enabled     = true;
                ButtonLast.Enabled     = true;
                ButtonNext.Enabled     = true;
                ButtonPrevious.Enabled = true;
                ButtonFirst.Enabled    = true;

                TextBoxID.Clear();
                TextBoxGroupID.Clear();
                TextBoxGroupName.Clear();
                TextBoxNameLng1.Clear();
                TextBoxNameLng2.Clear();
                TextBoxAddress.Clear();
                TextBoxCity.Clear();
                TextBoxEmail.Clear();
                TextBoxTelephone1.Clear();
                TextBoxTelephone2.Clear();
                TextBoxFax.Clear();
                TextBoxMobile.Clear();
                TextBoxCreditLimit.Clear();
                TextBoxDebitTrans.Clear();
                TextBoxCreditTrans.Clear();
                TextBoxBalance.Clear();
            }

            else if (_TypeOperation == ClassPublicVar.TypeOperation.Add)
            {
                TextBoxID.ReadOnly          = false;
                TextBoxGroupID.ReadOnly     = false;
                TextBoxGroupName.ReadOnly   = true;
                TextBoxNameLng1.ReadOnly    = false;
                TextBoxNameLng2.ReadOnly    = false;
                TextBoxAddress.ReadOnly     = false;
                TextBoxCity.ReadOnly        = false;
                TextBoxEmail.ReadOnly       = false;
                TextBoxTelephone1.ReadOnly  = false;
                TextBoxTelephone2.ReadOnly  = false;
                TextBoxFax.ReadOnly         = false;
                TextBoxMobile.ReadOnly      = false;
                TextBoxCreditLimit.ReadOnly = false;
                TextBoxDebitTrans.ReadOnly  = false;
                TextBoxCreditTrans.ReadOnly = false;
                TextBoxBalance.ReadOnly     = false;


                ButtonNew.Enabled    = true;
                ButtonEdit.Enabled   = false;
                ButtonSave.Enabled   = true;
                ButtonDelete.Enabled = false;
                ButtonPrint.Enabled  = false;
                ButtonSearch.Enabled = false;
                ButtonCancel.Enabled = true;
                ButtonExit.Enabled   = false;

                TreeViewMain.Enabled      = false;
                RadioBtnGroup.Enabled     = true;
                RadioBtnNotGroup.Enabled  = true;
                buttonGroupSearch.Enabled = true;

                ButtonExit.Enabled     = false;
                ButtonLast.Enabled     = false;
                ButtonNext.Enabled     = false;
                ButtonPrevious.Enabled = false;
                ButtonFirst.Enabled    = false;

                TextBoxID.Clear();
                TextBoxGroupID.Clear();
                TextBoxGroupName.Clear();
                TextBoxNameLng1.Clear();
                TextBoxNameLng2.Clear();
                TextBoxAddress.Clear();
                TextBoxCity.Clear();
                TextBoxEmail.Clear();
                TextBoxTelephone1.Clear();
                TextBoxTelephone2.Clear();
                TextBoxFax.Clear();
                TextBoxMobile.Clear();
                TextBoxCreditLimit.Clear();
                TextBoxDebitTrans.Clear();
                TextBoxCreditTrans.Clear();
                TextBoxBalance.Clear();
            }

            else if (_TypeOperation == ClassPublicVar.TypeOperation.Edit)
            {
                TextBoxID.ReadOnly          = true;
                TextBoxGroupID.ReadOnly     = false;
                TextBoxGroupName.ReadOnly   = true;
                TextBoxNameLng1.ReadOnly    = false;
                TextBoxNameLng2.ReadOnly    = false;
                TextBoxAddress.ReadOnly     = false;
                TextBoxCity.ReadOnly        = false;
                TextBoxEmail.ReadOnly       = false;
                TextBoxTelephone1.ReadOnly  = false;
                TextBoxTelephone2.ReadOnly  = false;
                TextBoxFax.ReadOnly         = false;
                TextBoxMobile.ReadOnly      = false;
                TextBoxCreditLimit.ReadOnly = false;
                TextBoxDebitTrans.ReadOnly  = false;
                TextBoxCreditTrans.ReadOnly = false;
                TextBoxBalance.ReadOnly     = false;


                ButtonNew.Enabled    = true;
                ButtonEdit.Enabled   = false;
                ButtonSave.Enabled   = true;
                ButtonDelete.Enabled = false;
                ButtonPrint.Enabled  = false;
                ButtonSearch.Enabled = false;
                ButtonCancel.Enabled = true;
                ButtonExit.Enabled   = false;

                TreeViewMain.Enabled      = false;
                RadioBtnGroup.Enabled     = true;
                RadioBtnNotGroup.Enabled  = true;
                buttonGroupSearch.Enabled = true;

                ButtonLast.Enabled     = false;
                ButtonNext.Enabled     = false;
                ButtonPrevious.Enabled = false;
                ButtonFirst.Enabled    = false;

                //TextBoxID.Clear();
                //TextBoxGroupID.Clear();
                //TextBoxGroupName.Clear();
                //TextBoxNameLng1.Clear();
                //TextBoxNameLng2.Clear();
                //TextBoxAddress.Clear();
                //TextBoxCity.Clear();
                //TextBoxEmail.Clear();
                //TextBoxTelephone1.Clear();
                //TextBoxTelephone2.Clear();
                //TextBoxFax.Clear();
                //TextBoxMobile.Clear();
                //TextBoxCreditLimit.Clear();
                //TextBoxDebitTrans.Clear();
                //TextBoxCreditTrans.Clear();
                //TextBoxBalance.Clear();
            }
        }
示例#2
0
        private void ToolsStatus()
        {
            if (_TypeOperation == ClassPublicVar.TypeOperation.Show)
            {
                TextBoxID.ReadOnly          = true;
                TextBoxGroupID.ReadOnly     = true;
                TextBoxGroupName.ReadOnly   = true;
                TextBoxNameLng1.ReadOnly    = true;
                TextBoxNameLng2.ReadOnly    = true;
                TextBoxTotalCredit.ReadOnly = true;
                TextBoxeTotalDebit.ReadOnly = true;
                TextBoxBalacne.ReadOnly     = true;
                TextBoxCreditLimit.ReadOnly = true;


                ButtonNew.Enabled    = true;
                ButtonEdit.Enabled   = true;
                ButtonSave.Enabled   = false;
                ButtonDelete.Enabled = true;
                ButtonPrint.Enabled  = true;
                ButtonSearch.Enabled = true;
                ButtonCancel.Enabled = false;
                ButtonExit.Enabled   = true;

                TreeViewMain.Enabled = true;

                RadioBtnGroup.Enabled     = false;
                RadioBtnNotGroup.Enabled  = false;
                buttonGroupSearch.Enabled = false;

                ButtonLast.Enabled     = true;
                ButtonNext.Enabled     = true;
                ButtonPrevious.Enabled = true;
                ButtonFirst.Enabled    = true;

                ComboBoxClass.Enabled  = false;
                CompBoxAccNaut.Enabled = false;
                CompBoxStatus.Enabled  = false;
                CompBoxPosting.Enabled = false;

                TextBoxID.Clear();
                TextBoxGroupID.Clear();
                TextBoxGroupName.Clear();
                TextBoxNameLng1.Clear();
                TextBoxNameLng2.Clear();
                TextBoxTotalCredit.Clear();
                TextBoxeTotalDebit.Clear();
                TextBoxBalacne.Clear();
                TextBoxCreditLimit.Clear();
            }

            else if (_TypeOperation == ClassPublicVar.TypeOperation.Add)
            {
                TextBoxID.ReadOnly          = false;
                TextBoxGroupID.ReadOnly     = false;
                TextBoxGroupName.ReadOnly   = true;
                TextBoxNameLng1.ReadOnly    = false;
                TextBoxNameLng2.ReadOnly    = false;
                TextBoxTotalCredit.ReadOnly = false;
                TextBoxeTotalDebit.ReadOnly = false;
                TextBoxBalacne.ReadOnly     = false;
                TextBoxCreditLimit.ReadOnly = false;
                RadioBtnNotGroup.Checked    = true;

                ButtonNew.Enabled    = true;
                ButtonEdit.Enabled   = false;
                ButtonSave.Enabled   = true;
                ButtonDelete.Enabled = false;
                ButtonPrint.Enabled  = false;
                ButtonSearch.Enabled = false;
                ButtonCancel.Enabled = true;
                ButtonExit.Enabled   = false;

                TreeViewMain.Enabled = false;

                RadioBtnGroup.Enabled     = true;
                RadioBtnNotGroup.Enabled  = true;
                buttonGroupSearch.Enabled = true;

                ButtonLast.Enabled     = false;
                ButtonNext.Enabled     = false;
                ButtonPrevious.Enabled = false;
                ButtonFirst.Enabled    = false;

                ComboBoxClass.Enabled  = true;
                CompBoxAccNaut.Enabled = true;
                CompBoxStatus.Enabled  = true;
                CompBoxPosting.Enabled = true;

                TextBoxID.Clear();
                TextBoxGroupID.Clear();
                TextBoxGroupName.Clear();
                TextBoxNameLng1.Clear();
                TextBoxNameLng2.Clear();
                TextBoxTotalCredit.Clear();
                TextBoxeTotalDebit.Clear();
                TextBoxBalacne.Clear();
                TextBoxCreditLimit.Clear();
            }

            else if (_TypeOperation == ClassPublicVar.TypeOperation.Edit)
            {
                TextBoxID.ReadOnly          = true;
                TextBoxGroupID.ReadOnly     = false;
                TextBoxGroupName.ReadOnly   = true;
                TextBoxNameLng1.ReadOnly    = false;
                TextBoxNameLng2.ReadOnly    = false;
                TextBoxTotalCredit.ReadOnly = false;
                TextBoxeTotalDebit.ReadOnly = false;
                TextBoxBalacne.ReadOnly     = false;
                TextBoxCreditLimit.ReadOnly = false;


                ButtonNew.Enabled    = false;
                ButtonEdit.Enabled   = false;
                ButtonSave.Enabled   = true;
                ButtonDelete.Enabled = false;
                ButtonPrint.Enabled  = false;
                ButtonSearch.Enabled = false;
                ButtonCancel.Enabled = true;
                ButtonExit.Enabled   = false;

                TreeViewMain.Enabled = false;

                RadioBtnGroup.Enabled     = true;
                RadioBtnNotGroup.Enabled  = true;
                buttonGroupSearch.Enabled = true;

                ButtonLast.Enabled     = false;
                ButtonNext.Enabled     = false;
                ButtonPrevious.Enabled = false;
                ButtonFirst.Enabled    = false;

                ComboBoxClass.Enabled  = true;
                CompBoxAccNaut.Enabled = true;
                CompBoxStatus.Enabled  = true;
                CompBoxPosting.Enabled = true;

                //TextBoxID.Clear();
                //TextBoxGroupID.Clear();
                //TextBoxGroupName.Clear();
                //TextBoxNameLng1.Clear();
                //TextBoxNameLng2.Clear();
                //TextBoxTotalCredit.Clear();
                //TextBoxeTotalDebit.Clear();
                //TextBoxBalacne.Clear();
                //TextBoxCreditLimit.Clear();
            }
        }