Ejemplo n.º 1
0
        private void bunifuImageButton2_Click(object sender, EventArgs e)
        {
            RecordPanel.Controls.Clear();
            patreg temp = new patreg();

            temp.TopLevel = false;
            RecordPanel.Controls.Add(temp);
            temp.Show();
        }
Ejemplo n.º 2
0
        private void bunifuImageButton1_Click(object sender, EventArgs e)
        {
            stfloginPnl.Controls.Clear();
            patreg temp = new patreg();

            temp.TopLevel = false;
            stfloginPnl.Controls.Add(temp);
            temp.Show();

            /*if (bunifuTextbox1.Text == "" || bunifuTextbox2.Text == "")
             * {
             *  MessageBox.Show("Please provide UserName and Password");
             *  return;
             * }
             * try
             * {
             *  SqlConnection conn = new SqlConnection(cs);
             *  SqlCommand cmd = new SqlCommand("select UserName,Password from [Doctor] where UserName=@UserName and Password=@Password", conn);
             *  cmd.Parameters.AddWithValue("@UserName", bunifuTextbox1.Text);
             *  cmd.Parameters.AddWithValue("@Password", bunifuTextbox2.Text);
             *  conn.Open();
             *  SqlDataAdapter adapt = new SqlDataAdapter(cmd);
             *  DataSet ds = new DataSet();
             *  adapt.Fill(ds);
             *  conn.Close();
             *  int count = ds.Tables[0].Rows.Count;
             *  if (count == 1)
             *  {
             *      stfloginPnl.Controls.Clear();
             *      patreg temp = new patreg();
             *      temp.TopLevel = false;
             *      stfloginPnl.Controls.Add(temp);
             *      temp.Show();
             *  }
             *  else
             *  {
             *      MessageBox.Show("Login Failed");
             *  }
             * }
             * catch (Exception ex)
             * {
             *  MessageBox.Show(ex.Message);
             * }*/
        }