public RecordLabel(Doctor Doctor, Patient Patient, int RecordIndex, Point Point) { InitializeComponent(); this.Location = Point; this.Doctor = Doctor; this.Patient = Patient; this.Record = Patient.Records[RecordIndex]; // load record info Label.Text = Record.Date.ToString("h : m d / M / yyyy"); subLabel.Text = Record.ID; }
public RecordManager(Doctor Doctor, Patient Patient, Record Record) { InitializeComponent(); this.Bounds = Screen.PrimaryScreen.Bounds; this.Doctor = Doctor; this.Patient = Patient; this.Record = Record; LoadComment(); DateTimeLabel.Text = Record.Date.ToString("d/M/yyyy - h:m"); AvatarBox.Image = Patient.Avatar; PatientNameLabel.Text = Patient.Name; TreatDoctorNameLabel.Text = "Doctor: " + Record.DoctorName; CommentsNumerLabel.Text = Record.Comment == null ? "No Comment" : Record.Comment.Count().ToString() + " Comments"; RecordLeghtLabel.Text = "Record Time: " + Record.Leght.Hour + " : " + Record.Leght.Minute + " : " + Record.Leght.Second; }
public CommentLabel(Doctor Doctor, Comment Comment, int Index, Point Point) { InitializeComponent(); this.Location = Point; this.Index = Index; // data this.Doctor = Doctor; this.Comment = Comment; this.DoctorNameLabel.Text = Comment.DoctorName; this.DateLabel.Text = Comment.DateTime.ToShortDateString() + " " + Comment.DateTime.ToShortTimeString(); this.CommentPreviewLabel.Text = Comment.Data.Length > 60 ? Comment.Data.Substring(0, 57).Replace("\n", " ") + "..." : Comment.Data.Replace("\n", " "); // Comment Preview label leght = 60 }
public PatientManager(Doctor Doctor, Patient Patient) { InitializeComponent(); InitializeFullScreen(); this.Doctor = Doctor; this.Patient = Patient; LoadRecord(); // patient info AvatarBox.Image = Patient.Avatar; NameBox.Text = Patient.Name; DoctorBox.Text = Patient.ID; SexBox.Text = Patient.Sex.ToString(); BirthdayBox.Value = Patient.Birthday; WeightBox.Value = (int)Patient.Weight; JobBox.Text = Patient.Job; AddressBox.Text = Patient.Address; // editable //EditButton.Enabled = Doctor.ID == Patient.DoctorID; }
public int AddComment(Doctor _doctor, DateTime _date, string _data) { Service.addNewComment(this.ID, _doctor.ID, _date, _data); this.Comment.Add(new Comment(this.ID, _doctor.ID, _doctor.Name, _date, _data)); return this.Comment.Count() - 1; }
public int AddComment(Doctor _doctor, string _data) { return AddComment(_doctor, DateTime.Now, _data); }
public void EditComment(Doctor _doctor, DateTime _date, string _data) { Service.editComment(this.ID, _doctor.ID, _date, _data); foreach (Comment c in Comment) if (c.DoctorID == _doctor.ID) { c.DateTime = _date; c.Data = _data; } }
public void EditComment(Doctor _doctor, string _data) { EditComment(_doctor, DateTime.Now, _data); }
// run when Load private void Login(object sender, EventArgs e) { LoginForm LoginForm = new LoginForm(); if (LoginForm.ShowDialog() == DialogResult.OK) { this.Doctor = LoginForm.Doctor; DoctorNameLabel.Text = Doctor.Name; MyPatientButton.Checked = true; //AllPatientButton.Checked = true; } else { Close(); } }
private void Login(object sender, EventArgs e) { try { LoginUser = Service.getUserByUsernamePassword(NameTextBox.Text, PasswordTextBox.Text); if (LoginUser == null || LoginUser.permission >= 3) { StatusLabel.Text = "Login faild"; PasswordTextBox.Text = ""; NameTextBox.Text = ""; NameTextBox.SelectAll(); } else { this.DialogResult = DialogResult.OK; Doctor = new Doctor(LoginUser); } } catch { DialogResult result = MessageBox.Show( "Cannot conect to server. Do you want to start with offline mode?", "Connet error", MessageBoxButtons.YesNo); if (result == DialogResult.Yes) { MonitorForm ViewECG = new MonitorForm(); ViewECG.Show(); } else { this.DialogResult = DialogResult.Cancel; } } }