Exemplo n.º 1
0
        /// <summary>
        /// 6. Delete clients in the data base
        /// </summary>
        public void DeleteClient(string idclient)
        {
            try
            {
                // we validate and convert data in the the Controller layer
                // we do not validate and convert data in the View layer
                // with idclient we update one row in the table

                // 1. Convert data
                int IDclient = Convert.ToInt32(idclient);
                // 2. Delete in the model layer
                Model.Delete(IDclient);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error in the delete: " + " " + ex.Message);
            }
        }