Dash
Dash
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Configuration;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;
using VistaRoboticsCS2.DAL;
using VistaRoboticsCS2.Model;
using VistaRoboticsCS2.UserControls;
namespace VistaRoboticsCS2.Forms
{
public partial class Dashboard : Form
{
public string LoggedInUsername { get; set; }
public int LoggedInUserOrgId { get; set; }
public int LoggedInUserId { get; set; }
resizeControl(panel7, originalpanelDashboard,
originalpanelDashboardFontSize);
resizeControl(pictureBox4, originalPcDashboard,
originalpcDashboardFontSize);
resizeControl(lbl_dashboard, originallblDashboard,
originallblDashboardFontSize);
resizeControl(panel9, originalpanelPatient,
originalpanelPatientFontSize);
resizeControl(pictureBox2, originalPcPatient,
originalpcPatientFontSize);
resizeControl(lbl_patient_list, originallblPatient,
originallblPatientFontSize);
resizeControl(panel8, originalpanelSetting,
originalpanelSettingFontSize);
resizeControl(pictureBox3, originalpcSetting,
originalpcSettingFontSize);
resizeControl(lbl_settings, originallblSetting,
originallblSettingFontSize);
resizeControl(panel_logout, originalpanel_logout,
originalpanel_logoutFontSize);
resizeControl(lbl_LogOut, originallpictureBox1,
originallbl_LogOutFontSize);
resizeControl(pictureBox1, originallbl_LogOut,
originalpictureBox1FontSize);
historyLogModel.Id = this.LoggedInUserId;
historyLogModel.Action = "Dashboard icon Clicked";
historyLogModel.Description = "Dashboard icon Clicked to display
DashboardControl";
new AuthDal().HistoryLog(historyLogModel);
//historyLogModel.Id = this.LoggedInUserId;
//historyLogModel.Action = "View Dashboard";
//historyLogModel.Description = LoggedInUsername +"View Dashboard";
//new AuthDal().HistoryLog(historyLogModel);
}
private void pictureBox4_Click(object sender, EventArgs e)
{
patientDetailsControl1.Visible = false;
patientListsControl1.Visible = false;
settingsControl1.Visible = false;
dashboardControl1.RefreshPatientList();
dashboardControl1.Visible = true;
BtnClickColorChange(panel7, null);
lbl_patient_list.ForeColor = Color.Black;
this.pictureBox2.Image = ((System.Drawing.Image)
(Properties.Resources.patient));
lbl_dashboard.ForeColor = Color.White;
this.pictureBox4.Image = ((System.Drawing.Image)
(Properties.Resources.white_dashboard));
lbl_settings.ForeColor = Color.Black;
this.pictureBox3.Image = ((System.Drawing.Image)
(Properties.Resources.setting));
dashboardControl1.Refresh();
//historyLogModel.Id = this.LoggedInUserId;
//historyLogModel.Action = "Dashboard icon Clicked";
//historyLogModel.Description = "Dashboard icon Clicked to display
DashboardControl";
//new AuthDal().HistoryLog(historyLogModel);
}
dashboardControl1.RemoveControls();
//history log table
//HistoryLogModel historyLogModel = new HistoryLogModel();
//historyLogModel.Id = this.LoggedInUserId;
//historyLogModel.Action = "PatientList icon Clicked";
//historyLogModel.Description = "PatientList icon Clicked to display
PatientListControl";
//new AuthDal().HistoryLog(historyLogModel);
}
dashboardControl1.RemoveControls();
////history log table
//HistoryLogModel historyLogModel = new HistoryLogModel();
//historyLogModel.Id = this.LoggedInUserId;
//historyLogModel.Action = "PatientList icon Clicked";
//historyLogModel.Description = "PatientList icon Clicked to display
PatientListControl";
//new AuthDal().HistoryLog(historyLogModel);
BtnClickColorChange(panel9, null);
lbl_patient_list.ForeColor = Color.White;
lbl_patient_list.ForeColor = Color.White;
this.pictureBox2.Image = ((System.Drawing.Image)
(Properties.Resources.white_patient));
lbl_dashboard.ForeColor = Color.Black;
this.pictureBox4.Image = ((System.Drawing.Image)
(Properties.Resources.dashboard));
lbl_settings.ForeColor = Color.Black;
this.pictureBox3.Image = ((System.Drawing.Image)
(Properties.Resources.setting));
dashboardControl1.RemoveControls();
////history log table
//HistoryLogModel historyLogModel = new HistoryLogModel();
//historyLogModel.Id = this.LoggedInUserId;
//historyLogModel.Action = "PatientList icon Clicked";
//historyLogModel.Description = "PatientList icon Clicked to display
PatientListControl";
//new AuthDal().HistoryLog(historyLogModel);
}
lbl_current_patient.Text = this.LoggedInUsername;
//Dashboard mform = new Dashboard();
dashboardControl1.LoggedInUsername = this.LoggedInUsername;
dashboardControl1.LoggedInUserId = this.LoggedInUserId;
dashboardControl1.LoggedInUserOrgId = this.LoggedInUserOrgId;
}
private void pictureBox2_MouseEnter(object sender, EventArgs e)
{
this.Cursor = Cursors.Hand;
//panel9.BackColor = Color.FromArgb(0, 87, 184);
//lbl_patient_list.ForeColor = Color.White;
//this.pictureBox2.Image = ((System.Drawing.Image)
(Properties.Resources.white_patient));
}
}
private void panel_logout_MouseEnter(object sender, EventArgs e)
{
this.Cursor = Cursors.Hand;
panel_logout.BackColor = Color.FromArgb(0, 87, 184);
lbl_LogOut.ForeColor = Color.White;
this.pictureBox1.Image = ((System.Drawing.Image)
(Properties.Resources.img_logout));
}
patientDetailsControl1.Visible = false;
patientListsControl1.Visible = false;
dashboardControl1.Visible = false;
settingsControl1.LoggedInUsername = this.LoggedInUsername;
settingsControl1.LoggedInUserId = this.LoggedInUserId;
settingsControl1.LoggedInUserOrgId = this.LoggedInUserOrgId;
settingsControl1.LoggedInOrgName = this.OrgName;
settingsControl1.Visible = true;
lbl_patient_list.ForeColor = Color.Black;
this.pictureBox2.Image = ((System.Drawing.Image)
(Properties.Resources.patient));
lbl_dashboard.ForeColor = Color.Black;
this.pictureBox4.Image = ((System.Drawing.Image)
(Properties.Resources.dashboard));
lbl_settings.ForeColor = Color.White;
this.pictureBox3.Image = ((System.Drawing.Image)
(Properties.Resources.white_setting));
dashboardControl1.RemoveControls();
}
patientDetailsControl1.Visible = false;
patientListsControl1.Visible = false;
dashboardControl1.Visible = false;
settingsControl1.LoggedInUsername = this.LoggedInUsername;
settingsControl1.LoggedInUserId = this.LoggedInUserId;
settingsControl1.LoggedInUserOrgId = this.LoggedInUserOrgId;
settingsControl1.LoggedInOrgName = this.OrgName;
settingsControl1.Visible = true;
lbl_patient_list.ForeColor = Color.Black;
this.pictureBox2.Image = ((System.Drawing.Image)
(Properties.Resources.patient));
lbl_dashboard.ForeColor = Color.Black;
this.pictureBox4.Image = ((System.Drawing.Image)
(Properties.Resources.dashboard));
lbl_settings.ForeColor = Color.White;
this.pictureBox3.Image = ((System.Drawing.Image)
(Properties.Resources.white_setting));
dashboardControl1.RemoveControls();
}
patientDetailsControl1.Visible = false;
patientListsControl1.Visible = false;
dashboardControl1.Visible = false;
settingsControl1.LoggedInUsername = this.LoggedInUsername;
settingsControl1.LoggedInUserId = this.LoggedInUserId;
settingsControl1.LoggedInUserOrgId = this.LoggedInUserOrgId;
settingsControl1.LoggedInOrgName = this.OrgName;
settingsControl1.Visible = true;
lbl_patient_list.ForeColor = Color.Black;
this.pictureBox2.Image = ((System.Drawing.Image)
(Properties.Resources.patient));
lbl_dashboard.ForeColor = Color.Black;
this.pictureBox4.Image = ((System.Drawing.Image)
(Properties.Resources.dashboard));
lbl_settings.ForeColor = Color.White;
this.pictureBox3.Image = ((System.Drawing.Image)
(Properties.Resources.white_setting));
dashboardControl1.RemoveControls();
}