Example #1
0
        public EmployeeForm(Login l)
        {
            this.l = l;
            er     = new EmployeeRepo();
            mr     = new MedicineRepo();
            InitializeComponent();
            Employee_Info(l);

            List <Medicine> listOfMdc = mr.GetAllMedicine();

            MdcnDataGridView.DataSource = listOfMdc;
        }
        private void PopulateCLBMedicine()
        {
            DataTable medicineTable = MedicineRepo.GetAllMedicine();

            for (int ax = 1; ax < medicineTable.Rows.Count; ax++)
            {
                clbMedicine.Items.Add(medicineTable.Rows[ax]["medicinename"].ToString());
            }

            DataTable allMedicineTable = PatientDiseaseRepo.GetIndividualMedicine(Convert.ToInt32(txtPersonID.Text));

            for (int ax = 0; ax < allMedicineTable.Rows.Count; ax++)
            {
                if (clbMedicine.Items.Contains(allMedicineTable.Rows[ax]["medicinename"].ToString()))
                {
                    clbMedicine.SetItemChecked(clbMedicine.Items.IndexOf(allMedicineTable.Rows[ax]["medicinename"].ToString()), true);
                }
            }
        }
Example #3
0
        private void ViewMedicine_Method(object sender, EventArgs e)
        {
            List <Medicine> listOfMdc = mr.GetAllMedicine();

            MdcnDataTableGridView.DataSource = listOfMdc;
        }