예제 #1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (IsValid())
            {
                _context.Create(txtName.Text, txtlastname.Text, txtnumtarj.Text, txtLimit.Text, cbtypeperson.Text, rdstatus.Checked);
                this.Close();
                client.ClientDataGrid.DataSource = _context.Getlist();

                MessageBox.Show("El cliente se agrego con exito", "Guardado", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
        public ActionResult <object> Create([FromBody] ClientesEntity Objeto)
        {
            string result = _repository.Create(Objeto);

            if (result != "")
            {
                return(BadRequest(result));
            }
            else
            {
                return(Ok());
            }
        }