Exemple #1
0
        public viewReport(MRDB mrdb)
        {
            this.mrdb = mrdb;
            InitializeComponent();
            List <String> listofmrsList = new List <string>()
            {
                "0", "123"
            };
            // listBox1.DataSource = listofmrsList;
            List <KeyValuePair <int, string> > mrlist = null;

            if (!this.mrdb.isMR)
            {
                mrlist = this.mrdb.getMRList();
            }
            else
            {
                mrlist = new List <KeyValuePair <int, string> >();
                mrlist.Add(new KeyValuePair <int, string>(this.mrdb.uid, "Your Reports"));
                button1.Visible = false;
            }

            comboBox1.DataSource = null;
            comboBox1.Items.Clear();
            comboBox1.DataSource    = new BindingSource(mrlist, null);
            comboBox1.DisplayMember = "Value";
            comboBox1.ValueMember   = "Key";
        }
Exemple #2
0
        public UpdateMedicine(MRDB mrdb)
        {
            this.mrdb = mrdb;
            InitializeComponent();
            medicines = this.mrdb.GetAllMedicines();

            List <String> medList = medicines.Select(m => m.name).ToList();

            listBox1.DataSource = medList;
        }
Exemple #3
0
        static void Main()
        {
            MRDB mrdb = new MRDB();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //Application.Run(new AddMedicineForm(mrdb));
            //Application.Run(new CreateReport(mrdb));
            //Application.Run(new UpdateMedicine(mrdb));
            //Application.Run(new viewReport(mrdb));
            Application.Run(new Login());
            //     Application.Run(new ConfirmScheduleForm(mrdb));
        }
Exemple #4
0
        public CreateReport(MRDB mrdb)
        {
            this.mrdb = mrdb;
            InitializeComponent();
            List <string> cities = new List <string>()
            {
                "nadiad",
                "ahmedabad",
                "vadodara"
            };

            listBox1.DataSource = cities;
            label1.Text         = "";
        }
        public AssignLocalityForm(MRDB mrdb)
        {
            this.mrdb = mrdb;
            InitializeComponent();
            List <KeyValuePair <int, string> > mrlist = this.mrdb.getMRList();

            comboBox1.DataSource = null;
            comboBox1.Items.Clear();
            comboBox1.DataSource    = new BindingSource(mrlist, null);
            comboBox1.DisplayMember = "Value";
            comboBox1.ValueMember   = "Key";



            List <KeyValuePair <string, string> > data = new List <KeyValuePair <string, string> >();

            string[] cg  = { "Ahmedabad", "Vadodara", "Anand", "Chhota Udaipur", "Dahod", "Kheda", "Mahisagar", "Panchmahal" };
            string[] ng  = { "Gandhinagar", "Aravalli", "Banaskantha", "Mehsana", "Patan", "Sabarkantha" };
            string[] sau = { "Rajkot",      "Amreli",   "Bhavnagar", "Botad", "Devbhoomi Dwarka",
                             "Gir Somnath", "Jamnagar", "Junagadh",  "Morbi", "Porbandar", "Surendranagar" };
            string[] kut = { "kutch" };
            string[] sg  = { "Surat", "Bharuch", "Dang", "Narmada", "Navsari", "Tapi", "Valsad" };
            //remainging from here

            String[] region_list = { "Central Gujarat", "North Gujarat", "Saurashtra", "Kutch", "South Gujarat" };

            regionLocalityMap.Add("Central Gujarat", cg);
            regionLocalityMap.Add("North Gujarat", ng);
            regionLocalityMap.Add("Saurashtra", sau);
            regionLocalityMap.Add("Kutch", kut);
            regionLocalityMap.Add("South Gujarat", sg);
            Array.Sort(region_list);
            foreach (string region in region_list)
            {
                data.Add(new KeyValuePair <string, string>(region, region));
            }
            comboBox2.DataSource = null;
            comboBox2.Items.Clear();
            comboBox2.DataSource    = new BindingSource(data, null);
            comboBox2.DisplayMember = "Value";
            comboBox2.ValueMember   = "Key";
            LocalityInput.Items.Clear();
            foreach (string locality in regionLocalityMap[region_list[0]])
            {
                LocalityInput.Items.Add(locality);
            }
        }
 public Main(MRDB mrdb)
 {
     this.mrdb = mrdb;
     InitializeComponent();
     if (mrdb.isMR)
     {
         groupBox1.Visible = false;
         button1.Visible   = false;
         button2.Visible   = false;
         button4.Visible   = false;
     }
     else
     {
         groupBox2.Visible = false;
         button3.Visible   = false;
     }
 }
Exemple #7
0
        public AddMedicineForm(MRDB mrdb)
        {
            this.mrdb = mrdb;

            /*List<Drug> alldrugs = new List<Drug>();
             * alldrugs.Add(new Drug(1,"ampineat","sdfasfa asjdfkl",0.24));
             * alldrugs.Add(new Drug(2, "paracetamol", "sdfasfa asjdfkl",0.10));
             * alldrugs.Add(new Drug(3, "dsajfkla", "sdfasfa asjdfkl",1.1));
             */
            List <Drug> alldrugs = mrdb.getAllDrugs();

            List <string> drugs = alldrugs.Select(s => s.name).ToList();

            /*
             * drugs.Add("ampineat");
             * drugs.Add("paracetamol");
             * drugs.Add("dsajfkla");
             */
            InitializeComponent();
            listBox1.DataSource = drugs;
        }
 public ConfirmSchedule(MRDB mrdb, int sid)
 {
     InitializeComponent();
     this.mrdb = mrdb;
     sc        = mrdb.getSchedule(sid);
     if (sc != null)
     {
         label4.Text   = sc.sid.ToString();
         label6.Text   = sc.uid.ToString();
         textBox1.Text = sc.places;
         label8.Text   = sc.from.ToString();
         label10.Text  = sc.to.ToString();
         if (sc.approved)
         {
             listBox1.SelectedIndex = 1;
         }
         else
         {
             listBox1.SelectedIndex = 0;
         }
     }
 }
Exemple #9
0
        public ManagerRegistration(MRDB mrdb)
        {
            this.mrdb = mrdb;
            InitializeComponent();
            List <KeyValuePair <string, string> > data = new List <KeyValuePair <string, string> >();

            /*  String[] region_list = { "Ahmedabad", "Vadodara", "Anand", "Chhota Udaipur", "Dahod", "Kheda", "Mahisagar", "Panchmahal",
             * "Gandhinagar","Aravalli","Banaskantha","Mehsana","Patan","Sabarkantha","Rajkot","Amreli","Bhavnagar","Botad","Devbhoomi Dwarka",
             * "Gir Somnath","Jamnagar","Junagadh","Morbi","Porbandar","Surendranagar","Kachchh",
             * "Surat","Bharuch","Dang","Narmada","Navsari","Tapi","Valsad"
             * };*/
            String[] region_list = { "Central Gujarat", "North Gujarat", "Saurashtra", "Kutch", "South Gujarat" };
            Array.Sort(region_list);
            foreach (string region in region_list)
            {
                data.Add(new KeyValuePair <string, string>(region, region));
            }
            RegionInput.DataSource = null;
            RegionInput.Items.Clear();
            RegionInput.DataSource    = new BindingSource(data, null);
            RegionInput.DisplayMember = "Value";
            RegionInput.ValueMember   = "Key";
        }
 public ScheduleList(MRDB mrdb)
 {
     this.mrdb = mrdb;
     Load     += formLoad;
     InitializeComponent();
 }
 public Register(MRDB mrdb)
 {
     this.mrdb = mrdb;
     InitializeComponent();
 }
 public Login()
 {
     this.mrdb = new MRDB();
     InitializeComponent();
 }
 public ConfirmScheduleForm(MRDB mrdb)
 {
     this.mrdb = mrdb;
     Load     += formLoad;
     InitializeComponent();
 }
 public AddSchedule(MRDB mrdb)
 {
     this.mrdb = mrdb;
     InitializeComponent();
 }
 public MRRegistration(MRDB mrdb)
 {
     this.mrdb = mrdb;
     InitializeComponent();
 }