示例#1
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Your Cart Will Delete !!!", "Continue ?", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
     {
         SqlCommand cmd = new SqlCommand();
         cmd.Connection  = clset.cn;
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.CommandText = "DeleteCart1";
         clset.cn.Open();
         cmd.ExecuteNonQuery();
         clset.cn.Close();
         Menahel men = new Menahel();
         men.Show();
         Close();
     }
     else
     {
         ActiveControl          = bar_txt;
         bar_txt.ReadOnly       = false;
         prod_name_txt.ReadOnly = true;
         price_txt.ReadOnly     = true;
         totla_txt.ReadOnly     = true;
         totla_txt.ReadOnly     = true;
         MessageBox.Show("You Can Continue", "Non deleted ", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
示例#2
0
        private void button3_Click(object sender, EventArgs e)
        {
            Menahel menahel = new Menahel();

            menahel.Show();
            Hide();
        }
示例#3
0
        private void start_btn_Click(object sender, EventArgs e)
        {
            if (int.Parse(id_txt.Text) == login.emot)
            {
                int flag = 0;

                flag = ClsUsers.login2(id);
                if (flag == 1)
                {
                    Menahel men = new Menahel();
                    flag = 0;
                    men.Show();
                    Close();
                }
                else
                {
                    flag = ClsUsers.login1(id);
                    if (flag == 1)
                    {
                        BuyingForm bf = new BuyingForm();
                        flag = 0;
                        bf.Show();
                        Close();
                    }
                }
            }
        }