コード例 #1
0
        private async Task <long> updatePatient(
            long id,
            string firstName,
            string lastName,
            string phoneNumber,
            string address,
            string dateOfBirth,
            string gender
            )
        {
            try {
                long updatedId = await patientModel.updatePatient(
                    id,
                    firstName,
                    lastName,
                    phoneNumber,
                    address,
                    dateOfBirth,
                    gender
                    );

                MessageBox.Show("Pacienti u përditësua me sukses!", "Sukses", MessageBoxButtons.OK, MessageBoxIcon.Information);

                return(updatedId);
            } catch (Exception e) {
                string caption = "Problem në shkrim";
                MessageBox.Show(e.Message, caption, MessageBoxButtons.OK, MessageBoxIcon.Error);

                return(-1);
            }
        }