private void MarkAttendence_Click(object sender, EventArgs e)
 {
     if (markAttendence.PrintBinary != null && markAttendence.Name != null && markAttendence.Studentid != null)
     {
         MarkAttendence Mark = new MarkAttendence()
         {
             Studentid        = markAttendence.Studentid,
             Name             = markAttendence.Name,
             PrintBinary      = markAttendence.PrintBinary,
             dataofattendance = DateTime.Now
         };
         try
         {
             HttpClient httpClient = new HttpClient();
             httpClient.BaseAddress = new Uri("http://localhost:12967/");
             HttpResponseMessage httpResponseMessage = httpClient.PostAsJsonAsync("api/AttendanceRecordsdatas", Mark).Result;
             MessageBox.Show("Attendence has been marked on live system");
         }
         catch (Exception es)
         {
             MessageBox.Show(es.Message);
         }
     }
     else
     {
         MessageBox.Show("Please fill all the fields and make sure finger print status has changed to captured");
     }
 }
        private void GetPrint_Click(object sender, EventArgs e)
        {
            markAttendence = new MarkAttendence();
            CaptureHuella capture = new CaptureHuella();

            capture.OnTemplate += this.OnTemplate;
            capture.ShowDialog();
            try
            {
                byte[] streamHuella = Template.Bytes;
                Status.Text = "Captured";
                markAttendence.Studentid   = StudentId.Text;
                markAttendence.Name        = Name.Text;
                markAttendence.PrintBinary = Template.Bytes;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }