示例#1
0
        public void btnPublish_Click(object sender, EventArgs e)
        {
            //Sqlbaglan.NesneVer().thisConn = new SqlConnection(@"Data Source=(localdb)\mssqllocaldb;initial catalog = ManagerPanel;integrated security = true");
            //Sqlbaglan.NesneVer().thisConn.Open();
            //Sqlbaglan.NesneVer().thisQuery = new SqlCommand("SELECT Kurallar FROM [Rules] WHERE TC=@TC", Sqlbaglan.NesneVer().thisConn);
            //Sqlbaglan.NesneVer().thisQuery.Parameters.AddWithValue("@TC", tbxTC.Text);

            //label1.Text = Sqlbaglan.NesneVer().thisQuery.ExecuteScalar().ToString();
            //Sqlbaglan.NesneVer().thisConn.Close();


            TC       = Convert.ToInt64(dgwRules.CurrentRow.Cells[1].Value);
            Kurallar = dgwRules.CurrentRow.Cells[2].Value.ToString();


            _iPublishingInformationService.Add(new PublishingInformation
            {
                Id       = Id,
                TC       = TC,
                Kurallar = Kurallar
            });
            MessageBox.Show("Kural yayınlandı.");
            Kurallar kurallar = new Kurallar();

            kurallar.KuralGetir();
        }
示例#2
0
 private void btnKurallar_Click(object sender, EventArgs e)
 {
     if (Application.OpenForms["Kurallar"] == null)
     {
         Kurallar kurallar = new Kurallar();
         kurallar.Show();
     }
 }