コード例 #1
0
        public IActionResult UpdateProfile(string PhoneNumber, string Name, int IDNumber)
        {
            //BillingSystemContext context = new BillingSystemContext();
            ProfileBLL bll = new ProfileBLL();

            bll.UpdateProfile(PhoneNumber, Name, IDNumber);
            return(RedirectToAction("ProfileDetails", new { ID = IDNumber }));
        }
コード例 #2
0
        private void cmdAccept_Click(object sender, EventArgs e)
        {
            try
            {
                ResultBM   result;
                ProfileBLL profileBll = new ProfileBLL();

                if (isUpdate)
                {
                    result = profileBll.UpdateProfile(this.Entity);
                    if (result.IsValid())
                    {
                        Close();
                    }
                    else
                    {
                        MessageBox.Show(result.description, "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }
                }
                else
                {
                    result = profileBll.CreateProfile(this.Entity);
                    if (result.IsValid())
                    {
                        Close();
                    }
                    else
                    {
                        MessageBox.Show(result.description, "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }
                }
            }
            catch (Exception exception)
            {
                MessageBox.Show("Se ha producido el siguiente error: " + exception.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }