Ejemplo n.º 1
0
 private void ButtonNew_Click(object sender, EventArgs e)
 {
     _ClassFillTree.FillTree(TreeViewMain, _ClassSelect.SelectOpration("TableHustingCauseways"), TableHustingCauseways.GroupID, TableHustingCauseways.ID, TableHustingCauseways.NameLng1, TableHustingCauseways.IsGroup);
     _TypeOperation = ClassPublicVar.TypeOperation.Add;
     ToolsStatus();
     TextBoxID.Focus();
 }
Ejemplo n.º 2
0
 private void BtnAdd_Click(object sender, EventArgs e)
 {
     phoneBindingSource.Add(new Phone());
     phoneBindingSource.MoveLast();
     Edit(false);
     TextBoxID.Focus();
 }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            TextFecha.Text = (DateTime.Now.Year + "-" + DateTime.Now.Month + "-" + DateTime.Now.Day);
            TextBoxID.Focus();
            Utilidades.SCritpValidacion();

            if (!Page.IsPostBack)
            {
                LlenarDrop();
            }
        }
        public WindowAddNewReport()
        {
            InitializeComponent();
            DataContext = this;

            EnteredValue = string.Empty;
            TextAbout    = "Для каждого отчета должен быть указан уникальный идентификатор." + Environment.NewLine +
                           "Он должен состоять из латинских букв (регистр не важен) и / или цифр, но не должен содержать пробелов." + Environment.NewLine +
                           "Идентификатор используется для запуска запланированного задания в системном планировщике заданий.";

            Loaded += (s, e) => { TextBoxID.Focus(); };
        }
Ejemplo n.º 5
0
        //ClassPublicVar.TypeOperation _TypeOperation;

        //  لفحص القيمة المدخلة هل هي موجوده مسبقا او لا\TextboxID دالة فحص
        public void SearchID(DataTable DtID)
        {
            foreach (DataRow row in DtID.Rows)
            {
                if (row[TableCostCenter.ID].ToString() == TextBoxID.Text)
                {
                    MessageBox.Show("موجود مسبقا");
                    TextBoxID.Focus();
                    TextBoxID.Clear();
                    break;
                }
            }
        }
Ejemplo n.º 6
0
 private void ButtonNew_Click(object sender, EventArgs e)
 {
     try
     {
         _ClassFillTree.FillTree(TreeViewMain, _ClassSelect.SelectOpration("TableBanks"), TableBanks.GroupID, TableBanks.ID, TableBanks.NameLng1, TableBanks.IsGroup);
         _TypeOperation = ClassPublicVar.TypeOperation.Add;
         ToolsStatus();
         TextBoxID.Focus();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Ejemplo n.º 7
0
        private void Button2_Click(object sender, RoutedEventArgs e)
        {
            if (!int.TryParse(TextBoxID.Text, out int id))
            {
                MessageBox.Show("Unesite ceo broj");
                TextBoxID.Clear();
                TextBoxID.Focus();
                return;
            }


            SqlDataAdapter da = new SqlDataAdapter("SELECT KupacId as Id, ImeKompanije as Firma, KontaktOsoba as Kontakt FROM Prodaja.Kupci", Konekcija.cnnTSQL2018);

            da.MissingSchemaAction = MissingSchemaAction.AddWithKey; //preuz info o primary key

            DataSet ds = new DataSet();                              //netipizirani ds
            DataRow dr = null;

            try
            {
                da.Fill(ds, "Kupci");
                DataTable tbl = ds.Tables[0];

                dr = tbl.Rows.Find(id);
            }
            catch (Exception xcp)
            {
                MessageBox.Show(xcp.Message);
                return;
            }

            StringBuilder sb = new StringBuilder();

            if (dr != null)
            {
                sb.AppendLine(dr[0].ToString());
                sb.AppendLine(dr[1].ToString());
                sb.AppendLine(dr[2].ToString());
            }
            else
            {
                sb.AppendLine("Ne postoji kupac ciji je id: " + id);
            }
            TextBlock1.Text = sb.ToString();
        }
Ejemplo n.º 8
0
        private void ButtonNew_Click(object sender, EventArgs e)
        {
            try
            {
                _TypeOperation = ClassPublicVar.TypeOperation.Add;

                //  تغيير حالة الادوات
                ToolsStatus();

                // تعبئة الكمبوبوكس
                ComboBox_Fill();
                TextBoxID.Focus();
                _ClassFillTree.FillTree(TreeViewMain, _ClassSelect.SelectOpration("TableChatOfAccount"), TableChatOfAccount.GroupID, TableChatOfAccount.ID, TableChatOfAccount.NameLng1, TableChatOfAccount.IsGroup);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Ejemplo n.º 9
0
        private void ButtonSave_Click(object sender, EventArgs e)
        {
            try
            {
                string IDNew = "";
                if (TextBoxID.Text != "" && TextBoxID.Text != " ")
                {
                    // Add
                    if (_TypeOperation == ClassPublicVar.TypeOperation.Add)
                    {
                        if (TextBoxGroupID.Text != "" && TextBoxGroupID.Text != " ")
                        {
                            if (RadioBtnGroup.Checked)
                            {
                                _ClassInsert.InsertOpration(new string[] { TableCostCenter.ID, TableCostCenter.GroupID, TableCostCenter.GroupName, TableCostCenter.NameLng1
                                                                           , TableCostCenter.NameLng2, TableCostCenter.IsGroup }
                                                            , new string[] { TextBoxID.Text, TextBoxGroupID.Text, TextBoxGroupName.Text,
                                                                             TextBoxNameLng1.Text, TextBoxNameLng2.Text, "1" }
                                                            , "TableCostCenter"
                                                            , true
                                                            );
                            }

                            else if (RadioBtnNotGroup.Checked)
                            {
                                _ClassInsert.InsertOpration(new string[] { TableCostCenter.ID, TableCostCenter.GroupID, TableCostCenter.GroupName, TableCostCenter.NameLng1
                                                                           , TableCostCenter.NameLng2, TableCostCenter.IsGroup }
                                                            , new string[] { TextBoxID.Text, TextBoxGroupID.Text, TextBoxGroupName.Text,
                                                                             TextBoxNameLng1.Text, TextBoxNameLng2.Text, "0" }
                                                            , "TableCostCenter"
                                                            , true
                                                            );
                            }
                        }


                        else if (TextBoxGroupID.Text == "" || TextBoxGroupID.Text == " ")
                        {
                            _ClassInsert.InsertOpration(new string[] { TableCostCenter.ID, TableCostCenter.GroupID, TableCostCenter.GroupName, TableCostCenter.NameLng1
                                                                       , TableCostCenter.NameLng2, TableCostCenter.IsGroup }
                                                        , new string[] { TextBoxID.Text, "0", "Root",
                                                                         TextBoxNameLng1.Text, TextBoxNameLng2.Text, "0" }
                                                        , "TableCostCenter"
                                                        , true
                                                        );
                        }
                    }

                    // Edit
                    else if (_TypeOperation == ClassPublicVar.TypeOperation.Edit)
                    {
                        if (TextBoxGroupID.Text != "" && TextBoxGroupID.Text != " ")
                        {
                            if (RadioBtnGroup.Checked)
                            {
                                _ClassUpdate.UpdateOpration(new string[] { TableCostCenter.ID, TableCostCenter.GroupID, TableCostCenter.GroupName, TableCostCenter.NameLng1
                                                                           , TableCostCenter.NameLng2, TableCostCenter.IsGroup }
                                                            , new string[] { TextBoxID.Text, TextBoxGroupID.Text, TextBoxGroupName.Text,
                                                                             TextBoxNameLng1.Text, TextBoxNameLng2.Text, "1" }
                                                            , new string[] { TableCostCenter.ID }, new string[] { NodeID }
                                                            , "TableCostCenter", true);
                            }
                            else if (RadioBtnNotGroup.Checked)
                            {
                                _ClassUpdate.UpdateOpration(new string[] { TableCostCenter.ID, TableCostCenter.GroupID, TableCostCenter.GroupName, TableCostCenter.NameLng1
                                                                           , TableCostCenter.NameLng2, TableCostCenter.IsGroup }
                                                            , new string[] { TextBoxID.Text, TextBoxGroupID.Text, TextBoxGroupName.Text,
                                                                             TextBoxNameLng1.Text, TextBoxNameLng2.Text, "0" }
                                                            , new string[] { TableCostCenter.ID }, new string[] { NodeID }
                                                            , "TableCostCenter", true);
                            }
                        }

                        else if (TextBoxGroupID.Text == "" || TextBoxGroupID.Text == " ")
                        {
                            _ClassUpdate.UpdateOpration(new string[] { TableCostCenter.ID, TableCostCenter.GroupID, TableCostCenter.GroupName, TableCostCenter.NameLng1
                                                                       , TableCostCenter.NameLng2, TableCostCenter.IsGroup }
                                                        , new string[] { TextBoxID.Text, "0", "Root",
                                                                         TextBoxNameLng1.Text, TextBoxNameLng2.Text, "0" }
                                                        , new string[] { TableCostCenter.ID }, new string[] { NodeID }
                                                        , "TableCostCenter", true);
                        }
                    }

                    // عرض النود الجديد
                    IDNew = TextBoxID.Text;

                    _TypeOperation = ClassPublicVar.TypeOperation.Show;
                    _ClassFillTree.FillTree(TreeViewMain, _ClassSelect.SelectOpration("TableCostCenter"), TableCostCenter.GroupID, TableCostCenter.ID, TableCostCenter.NameLng1, TableCostCenter.IsGroup);
                    ToolsStatus();
                    _ClassTreeViewController.SelectfromTree(ref TreeViewMain, IDNew);

                    // FormCostCenter_Load(sender, e);
                    //_ClassFillTree.FillTree(TreeViewMain, _ClassSelect.SelectOpration("TableCostCenter"), TableCostCenter.GroupID, TableCostCenter.ID, TableCostCenter.NameLng1, TableCostCenter.IsGroup);
                }
                else
                {
                    MessageBox.Show("لم يتم إدخال رقم كود", "خطأ في الإدخال", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    TextBoxID.Focus();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Ejemplo n.º 10
0
 private void BtnEdit_Click(object sender, EventArgs e)
 {
     Edit(false);
     TextBoxID.Focus();
 }
Ejemplo n.º 11
0
        private void ButtonSave_Click(object sender, EventArgs e)
        {
            try
            {
                string IDNew = "";
                if (TextBoxID.Text != "" && TextBoxID.Text != " ")
                {
                    if (_TypeOperation == ClassPublicVar.TypeOperation.Add)
                    {
                        if (TextBoxGroupID.Text != "" && TextBoxGroupID.Text != " ")
                        {
                            if (RadioBtnGroup.Checked)
                            {
                                _ClassInsert.InsertOpration(new string[] { TableCustomer.IDMain, TableCustomer.ID, TableCustomer.GroupID, TableCustomer.GroupName, TableCustomer.NameLng1, TableCustomer.NameLng2, TableCustomer.IsGroup,
                                                                           TableCustomer.Address, TableCustomer.City, TableCustomer.Email,
                                                                           TableCustomer.Telephone1, TableCustomer.Telephone2, TableCustomer.Fax, TableCustomer.Mobile,
                                                                           TableCustomer.CreditLimit, TableCustomer.DebitTrans, TableCustomer.CreditTrans, TableCustomer.Balance }
                                                            , new string[] { TextBoxMainID.Text, TextBoxID.Text, TextBoxGroupID.Text, TextBoxGroupName.Text, TextBoxNameLng1.Text, TextBoxNameLng2.Text, "1",
                                                                             TextBoxAddress.Text, TextBoxCity.Text, TextBoxEmail.Text,
                                                                             TextBoxTelephone1.Text, TextBoxTelephone2.Text, TextBoxFax.Text, TextBoxMobile.Text,
                                                                             TextBoxCreditLimit.Text, TextBoxDebitTrans.Text, TextBoxCreditTrans.Text, TextBoxBalance.Text }

                                                            , "TableCustomer"
                                                            , true
                                                            );
                            }

                            else if (RadioBtnNotGroup.Checked)
                            {
                                _ClassInsert.InsertOpration(new string[] { TableCustomer.IDMain, TableCustomer.ID, TableCustomer.GroupID, TableCustomer.GroupName, TableCustomer.NameLng1, TableCustomer.NameLng2, TableCustomer.IsGroup,
                                                                           TableCustomer.Address, TableCustomer.City, TableCustomer.Email,
                                                                           TableCustomer.Telephone1, TableCustomer.Telephone2, TableCustomer.Fax, TableCustomer.Mobile,
                                                                           TableCustomer.CreditLimit, TableCustomer.DebitTrans, TableCustomer.CreditTrans, TableCustomer.Balance }
                                                            , new string[] { TextBoxMainID.Text, TextBoxID.Text, TextBoxGroupID.Text, TextBoxGroupName.Text, TextBoxNameLng1.Text, TextBoxNameLng2.Text, "0",
                                                                             TextBoxAddress.Text, TextBoxCity.Text, TextBoxEmail.Text,
                                                                             TextBoxTelephone1.Text, TextBoxTelephone2.Text, TextBoxFax.Text, TextBoxMobile.Text,
                                                                             TextBoxCreditLimit.Text, TextBoxDebitTrans.Text, TextBoxCreditTrans.Text, TextBoxBalance.Text }
                                                            , "TableCustomer"
                                                            , true
                                                            );
                            }
                        }

                        else if (TextBoxGroupID.Text == "" || TextBoxGroupID.Text == " ")
                        {
                            _ClassInsert.InsertOpration(new string[] { TableCustomer.IDMain, TableCustomer.ID, TableCustomer.GroupID, TableCustomer.GroupName, TableCustomer.NameLng1, TableCustomer.NameLng2, TableCustomer.IsGroup,
                                                                       TableCustomer.Address, TableCustomer.City, TableCustomer.Email,
                                                                       TableCustomer.Telephone1, TableCustomer.Telephone2, TableCustomer.Fax, TableCustomer.Mobile,
                                                                       TableCustomer.CreditLimit, TableCustomer.DebitTrans, TableCustomer.CreditTrans, TableCustomer.Balance }
                                                        , new string[] { TextBoxMainID.Text, TextBoxID.Text, "0", "Root", TextBoxNameLng1.Text, TextBoxNameLng2.Text, "0",
                                                                         TextBoxAddress.Text, TextBoxCity.Text, TextBoxEmail.Text,
                                                                         TextBoxTelephone1.Text, TextBoxTelephone2.Text, TextBoxFax.Text, TextBoxMobile.Text,
                                                                         TextBoxCreditLimit.Text, TextBoxDebitTrans.Text, TextBoxCreditTrans.Text, TextBoxBalance.Text }
                                                        , "TableCustomer"
                                                        , true
                                                        );
                        }
                    }

                    else if (_TypeOperation == ClassPublicVar.TypeOperation.Edit)
                    {
                        if (TextBoxGroupID.Text != "" && TextBoxGroupID.Text != " ")
                        {
                            if (RadioBtnGroup.Checked)
                            {
                                _ClassUpdate.UpdateOpration(new string[] { TableCustomer.IDMain, TableCustomer.ID, TableCustomer.GroupID, TableCustomer.GroupName, TableCustomer.NameLng1, TableCustomer.NameLng2, TableCustomer.IsGroup,
                                                                           TableCustomer.Address, TableCustomer.City, TableCustomer.Email,
                                                                           TableCustomer.Telephone1, TableCustomer.Telephone2, TableCustomer.Fax, TableCustomer.Mobile,
                                                                           TableCustomer.CreditLimit, TableCustomer.DebitTrans, TableCustomer.CreditTrans, TableCustomer.Balance }
                                                            , new string[] { TextBoxMainID.Text, TextBoxID.Text, TextBoxGroupID.Text, TextBoxGroupName.Text, TextBoxNameLng1.Text, TextBoxNameLng2.Text, "1",
                                                                             TextBoxAddress.Text, TextBoxCity.Text, TextBoxEmail.Text,
                                                                             TextBoxTelephone1.Text, TextBoxTelephone2.Text, TextBoxFax.Text, TextBoxMobile.Text,
                                                                             TextBoxCreditLimit.Text, TextBoxDebitTrans.Text, TextBoxCreditTrans.Text, TextBoxBalance.Text }
                                                            , new string[] { TableCustomer.ID }, new string[] { NodeID }
                                                            , "TableCustomer", true);
                            }
                            else if (RadioBtnNotGroup.Checked)
                            {
                                _ClassUpdate.UpdateOpration(new string[] { TableCustomer.ID, TableCustomer.GroupID, TableCustomer.GroupName, TableCustomer.NameLng1, TableCustomer.NameLng2, TableCustomer.IsGroup,
                                                                           TableCustomer.Address, TableCustomer.City, TableCustomer.Email,
                                                                           TableCustomer.Telephone1, TableCustomer.Telephone2, TableCustomer.Fax, TableCustomer.Mobile,
                                                                           TableCustomer.CreditLimit, TableCustomer.DebitTrans, TableCustomer.CreditTrans, TableCustomer.Balance }
                                                            , new string[] { TextBoxMainID.Text, TextBoxID.Text, TextBoxGroupID.Text, TextBoxGroupName.Text, TextBoxNameLng1.Text, TextBoxNameLng2.Text, "0",
                                                                             TextBoxAddress.Text, TextBoxCity.Text, TextBoxEmail.Text,
                                                                             TextBoxTelephone1.Text, TextBoxTelephone2.Text, TextBoxFax.Text, TextBoxMobile.Text,
                                                                             TextBoxCreditLimit.Text, TextBoxDebitTrans.Text, TextBoxCreditTrans.Text, TextBoxBalance.Text }
                                                            , new string[] { TableCustomer.ID }, new string[] { NodeID }
                                                            , "TableCustomer", true);
                            }
                        }

                        else if (TextBoxGroupID.Text == "" || TextBoxGroupID.Text == " ")
                        {
                            _ClassUpdate.UpdateOpration(new string[] { TableCustomer.ID, TableCustomer.GroupID, TableCustomer.GroupName, TableCustomer.NameLng1, TableCustomer.NameLng2, TableCustomer.IsGroup,
                                                                       TableCustomer.Address, TableCustomer.City, TableCustomer.Email,
                                                                       TableCustomer.Telephone1, TableCustomer.Telephone2, TableCustomer.Fax, TableCustomer.Mobile,
                                                                       TableCustomer.CreditLimit, TableCustomer.DebitTrans, TableCustomer.CreditTrans, TableCustomer.Balance }
                                                        , new string[] { TextBoxMainID.Text, TextBoxID.Text, "0", "Root", TextBoxNameLng1.Text, TextBoxNameLng2.Text, "0",
                                                                         TextBoxAddress.Text, TextBoxCity.Text, TextBoxEmail.Text,
                                                                         TextBoxTelephone1.Text, TextBoxTelephone2.Text, TextBoxFax.Text, TextBoxMobile.Text,
                                                                         TextBoxCreditLimit.Text, TextBoxDebitTrans.Text, TextBoxCreditTrans.Text, TextBoxBalance.Text }
                                                        , new string[] { TableCustomer.ID }, new string[] { NodeID }
                                                        , "TableCustomer", true);
                        }
                    }
                    // عرض النود الجديد
                    IDNew          = TextBoxID.Text;
                    _TypeOperation = ClassPublicVar.TypeOperation.Show;

                    _ClassFillTree.FillTree(TreeViewMain, _ClassSelect.SelectOpration("TableCustomer"), TableCustomer.GroupID
                                            , TableCustomer.ID, TableCustomer.NameLng1, TableCustomer.IsGroup);

                    ToolsStatus();
                    _ClassTreeViewController.SelectfromTree(ref TreeViewMain, IDNew);
                    //FormCustomers_Load( sender, e);
                }
                else
                {
                    MessageBox.Show("لم يتم إدخال رقم كود", "خطأ في الإدخال", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    TextBoxID.Focus();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Ejemplo n.º 12
0
        private void ButtonSave_Click(object sender, EventArgs e)
        {
            try
            {
                string IDNew = "";
                if (TextBoxID.Text != "" && TextBoxID.Text != " ")
                {
                    if (_TypeOperation == ClassPublicVar.TypeOperation.Add)
                    {
                        if (TextBoxGroupID.Text != "" && TextBoxGroupID.Text != " ")
                        {
                            if (RadioBtnGroup.Checked)
                            {
                                _ClassInsert.InsertOpration(new string[] { TableChatOfAccount.ID, TableChatOfAccount.GroupID, TableChatOfAccount.GroupName, TableChatOfAccount.NameLng1
                                                                           , TableChatOfAccount.NameLng2, TableChatOfAccount.Class, TableChatOfAccount.AccNaut
                                                                           , TableChatOfAccount.Status, TableChatOfAccount.TotalCredit, TableChatOfAccount.TotalDebit
                                                                           , TableChatOfAccount.Balacne, TableChatOfAccount.CreditLimit, TableChatOfAccount.Posting
                                                                           , TableChatOfAccount.IsGroup }

                                                            , new string[] { TextBoxID.Text, TextBoxGroupID.Text, TextBoxGroupName.Text, TextBoxNameLng1.Text, TextBoxNameLng2.Text
                                                                             , ComboBoxClass.Text, CompBoxAccNaut.Text, CompBoxStatus.Text, TextBoxTotalCredit.Text
                                                                             , TextBoxeTotalDebit.Text, TextBoxBalacne.Text, TextBoxCreditLimit.Text, CompBoxPosting.Text
                                                                             , "1" }
                                                            , "TableChatOfAccount"
                                                            , true
                                                            );
                            }

                            else if (RadioBtnNotGroup.Checked)
                            {
                                _ClassInsert.InsertOpration(new string[] { TableChatOfAccount.ID, TableChatOfAccount.GroupID, TableChatOfAccount.GroupName, TableChatOfAccount.NameLng1
                                                                           , TableChatOfAccount.NameLng2, TableChatOfAccount.Class, TableChatOfAccount.AccNaut
                                                                           , TableChatOfAccount.Status, TableChatOfAccount.TotalCredit, TableChatOfAccount.TotalDebit
                                                                           , TableChatOfAccount.Balacne, TableChatOfAccount.CreditLimit, TableChatOfAccount.Posting
                                                                           , TableChatOfAccount.IsGroup }

                                                            , new string[] { TextBoxID.Text, TextBoxGroupID.Text, TextBoxGroupName.Text, TextBoxNameLng1.Text, TextBoxNameLng2.Text
                                                                             , ComboBoxClass.Text, CompBoxAccNaut.Text, CompBoxStatus.Text, TextBoxTotalCredit.Text
                                                                             , TextBoxeTotalDebit.Text, TextBoxBalacne.Text, TextBoxCreditLimit.Text, CompBoxPosting.Text
                                                                             , "0" }
                                                            , "TableChatOfAccount"
                                                            , true
                                                            );
                            }
                        }
                        else if (TextBoxGroupID.Text == "" || TextBoxGroupID.Text == " ")
                        {
                            _ClassInsert.InsertOpration(new string[] { TableChatOfAccount.ID, TableChatOfAccount.GroupID, TableChatOfAccount.GroupName, TableChatOfAccount.NameLng1
                                                                       , TableChatOfAccount.NameLng2, TableChatOfAccount.Class, TableChatOfAccount.AccNaut
                                                                       , TableChatOfAccount.Status, TableChatOfAccount.TotalCredit, TableChatOfAccount.TotalDebit
                                                                       , TableChatOfAccount.Balacne, TableChatOfAccount.CreditLimit, TableChatOfAccount.Posting
                                                                       , TableChatOfAccount.IsGroup }

                                                        , new string[] { TextBoxID.Text, "0", "Root", TextBoxNameLng1.Text, TextBoxNameLng2.Text
                                                                         , ComboBoxClass.Text, CompBoxAccNaut.Text, CompBoxStatus.Text, TextBoxTotalCredit.Text
                                                                         , TextBoxeTotalDebit.Text, TextBoxBalacne.Text, TextBoxCreditLimit.Text, CompBoxPosting.Text
                                                                         , "0" }
                                                        , "TableChatOfAccount"
                                                        , true
                                                        );
                        }
                    }
                    else if (_TypeOperation == ClassPublicVar.TypeOperation.Edit)
                    {
                        if (TextBoxGroupID.Text != "" && TextBoxGroupID.Text != " ")
                        {
                            if (RadioBtnGroup.Checked)
                            {
                                _ClassUpdate.UpdateOpration(new string[]  { TableChatOfAccount.ID, TableChatOfAccount.GroupID, TableChatOfAccount.GroupName, TableChatOfAccount.NameLng1
                                                                            , TableChatOfAccount.NameLng2, TableChatOfAccount.Class, TableChatOfAccount.AccNaut
                                                                            , TableChatOfAccount.Status, TableChatOfAccount.TotalCredit, TableChatOfAccount.TotalDebit
                                                                            , TableChatOfAccount.Balacne, TableChatOfAccount.CreditLimit, TableChatOfAccount.Posting
                                                                            , TableChatOfAccount.IsGroup }
                                                            , new string[] { TextBoxID.Text, TextBoxGroupID.Text, TextBoxGroupName.Text, TextBoxNameLng1.Text, TextBoxNameLng2.Text
                                                                             , ComboBoxClass.Text, CompBoxAccNaut.Text, CompBoxStatus.Text, TextBoxTotalCredit.Text
                                                                             , TextBoxeTotalDebit.Text, TextBoxBalacne.Text, TextBoxCreditLimit.Text, CompBoxPosting.Text
                                                                             , "1" }
                                                            , new string[] { TableChatOfAccount.ID }, new string[] { NodeID }
                                                            , "TableChatOfAccount", true);
                            }
                            else if (RadioBtnNotGroup.Checked)
                            {
                                _ClassUpdate.UpdateOpration(new string[] { TableChatOfAccount.ID, TableChatOfAccount.GroupID, TableChatOfAccount.GroupName, TableChatOfAccount.NameLng1
                                                                           , TableChatOfAccount.NameLng2, TableChatOfAccount.Class, TableChatOfAccount.AccNaut
                                                                           , TableChatOfAccount.Status, TableChatOfAccount.TotalCredit, TableChatOfAccount.TotalDebit
                                                                           , TableChatOfAccount.Balacne, TableChatOfAccount.CreditLimit, TableChatOfAccount.Posting
                                                                           , TableChatOfAccount.IsGroup }
                                                            , new string[] { TextBoxID.Text, TextBoxGroupID.Text, TextBoxGroupName.Text, TextBoxNameLng1.Text, TextBoxNameLng2.Text
                                                                             , ComboBoxClass.Text, CompBoxAccNaut.Text, CompBoxStatus.Text, TextBoxTotalCredit.Text
                                                                             , TextBoxeTotalDebit.Text, TextBoxBalacne.Text, TextBoxCreditLimit.Text, CompBoxPosting.Text
                                                                             , "0" }
                                                            , new string[] { TableChatOfAccount.ID }, new string[] { NodeID }
                                                            , "TableChatOfAccount", true);
                            }
                        }

                        else if (TextBoxGroupID.Text == "" || TextBoxGroupID.Text == " ")
                        {
                            _ClassUpdate.UpdateOpration(new string[] { TableChatOfAccount.ID, TableChatOfAccount.GroupID, TableChatOfAccount.GroupName, TableChatOfAccount.NameLng1
                                                                       , TableChatOfAccount.NameLng2, TableChatOfAccount.Class, TableChatOfAccount.AccNaut
                                                                       , TableChatOfAccount.Status, TableChatOfAccount.TotalCredit, TableChatOfAccount.TotalDebit
                                                                       , TableChatOfAccount.Balacne, TableChatOfAccount.CreditLimit, TableChatOfAccount.Posting
                                                                       , TableChatOfAccount.IsGroup }
                                                        , new string[] { TextBoxID.Text, "0", "Root", TextBoxNameLng1.Text, TextBoxNameLng2.Text
                                                                         , ComboBoxClass.Text, CompBoxAccNaut.Text, CompBoxStatus.Text, TextBoxTotalCredit.Text
                                                                         , TextBoxeTotalDebit.Text, TextBoxBalacne.Text, TextBoxCreditLimit.Text, CompBoxPosting.Text
                                                                         , "0" }
                                                        , new string[] { TableChatOfAccount.ID }, new string[] { NodeID }
                                                        , "TableChatOfAccount", true);
                        }
                    }

                    // عرض النود الجديد
                    IDNew          = TextBoxID.Text;
                    _TypeOperation = ClassPublicVar.TypeOperation.Show;
                    _ClassFillTree.FillTree(TreeViewMain, _ClassSelect.SelectOpration("TableChatOfAccount"), TableChatOfAccount.GroupID, TableChatOfAccount.ID, TableChatOfAccount.NameLng1, TableChatOfAccount.IsGroup);
                    ToolsStatus();
                    _ClassTreeViewController.SelectfromTree(ref TreeViewMain, IDNew);

                    //FormChatOfAccount_Load(sender, e);
                }
                else
                {
                    MessageBox.Show("لم يتم إدخال رقم كود", "خطأ في الإدخال", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    TextBoxID.Focus();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }