Exemplo n.º 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            blood_types Type     = (blood_types)Enum.Parse(typeof(blood_types), typeCombo.Text);
            DateTime    expireDT = dateTimePicker1.Value.Date + dateTimePicker1.Value.TimeOfDay;

            BloodbankOperations.add_blood_type(Type, bbNameBox.Text, expireDT);
        }
Exemplo n.º 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (BloodbankOperations.Login(textBox1.Text, textBox2.Text))
     {
         BloodBankHomeForm bb = new BloodBankHomeForm();
         bb.Show();
         this.Hide();
     }
 }
        private void button1_Click(object sender, EventArgs e)
        {
            bool updateRes = BloodbankOperations.ProfileEdit(nameField.Text, emailField.Text, passwordField.Text, imgloc, textBox2.Text, textBox1.Text, mobileField.Text, checkBox1.Checked);

            if (updateRes)
            {
                MessageBox.Show("Profile edited succesfully");
            }
            else
            {
                MessageBox.Show("ERROR");
            }
        }
Exemplo n.º 4
0
        private void forgetPassButtonforBanks_Click(object sender, EventArgs e)
        {
            Regex regex = new Regex(@"^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$");
            Match match = regex.Match(emailText.Text);

            if (!match.Success)
            {
                emailMessage.Text = "Enter valid email !";
                return;
            }
            BloodbankOperations.FrogetPass(emailText.Text);

            LoginForm login = new LoginForm();

            login.Show();
            this.Hide();
        }
 private void button2_Click_1(object sender, EventArgs e)
 {
     if (choise == "user")
     {
         UserOperations.Request_Blood(NameBox.Text, emailBox.Text, bbnameCombo.Text, TypesCombo.Text, int.Parse(AmountBox.Text));
         UserHomeForm rb = new UserHomeForm();
         rb.Show();
         this.Hide();
     }
     else
     {
         BloodbankOperations.Request_Blood(NameBox.Text, emailBox.Text, bbnameCombo.Text, TypesCombo.Text, int.Parse(AmountBox.Text));
         BloodBankHomeForm rb = new BloodBankHomeForm();
         rb.Show();
         this.Hide();
     }
     MessageBox.Show("Done!");
 }
Exemplo n.º 6
0
        private void button1_Click(object sender, EventArgs e)
        {
            blood_types Type = (blood_types)Enum.Parse(typeof(blood_types), typeCombo.Text);

            BloodbankOperations.remove_blood_type(Type, bbNameBox.Text);
        }