public PrescriptionFileListForm(object obj)
 {
     InitializeComponent();
     System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
     dirpath  = config.AppSettings.Settings["prescriptionPath"].Value;
     fileList = System.IO.Directory.GetFiles(dirpath);
     Doctor   = obj as Models.DoctorClass;
     LoadingPrescriptionFiles();
     InitializeFileListView();
 }
Exemplo n.º 2
0
 private static Models.DoctorClass ValidateLogin(string ID = null, string password = null)
 {
     Models.DoctorClass doctor = new Models.DoctorClass();
     doctor.Name       = "신라";
     doctor.ID         = "D100171227173011";
     doctor.Department = "내과";
     doctor.Age        = null;
     doctor.Birthday   = null;
     doctor.Sex        = null;
     doctor.ResidentRegistrationNumber = null;
     doctor.Password = null;
     return(doctor);
 }
        /***
         * LOGIN button action
         ***/
        private void button1_Click(object sender, EventArgs e)
        {
            IEnumerable <Models.DoctorClass> resultList =
                from result in doctorList
                where result.ID.Equals(this.textBox1.Text) && result.Password.Equals(this.textBox2.Text)
                select result;

            if (resultList.Count() > 0)
            {
                Models.DoctorClass obj = resultList.ToArray().GetValue(0) as Models.DoctorClass;
                FeedbackEventHandle(obj);
                this.DialogResult = DialogResult.OK;
                this.Close();
            }
            else
            {
                DialogResult r = MessageBox.Show("The ID or password entried is invalid, please entry angin.", "Checking Form", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Exemplo n.º 4
0
 private static void LoginFeedback(Models.DoctorClass obj)
 {
     doctor = obj;
 }