예제 #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     using (var dialog = new EditFeed())
     {
         dialog.EditType = 1;
         if (dialog.ShowDialog() == DialogResult.OK)
         {
             BindData(GetFeeds());
         }
     }
 }
예제 #2
0
파일: Feeds.cs 프로젝트: wcrowe/CarCrawler
 private void button1_Click(object sender, EventArgs e)
 {
     using (var dialog = new EditFeed())
     {
             dialog.EditType = 1;
             if (dialog.ShowDialog() == DialogResult.OK)
             {
                 BindData(GetFeeds());
             }
     }
 }
예제 #3
0
파일: Feeds.cs 프로젝트: wcrowe/CarCrawler
        private void button2_Click(object sender, EventArgs e)
        {
            using (var dialog = new EditFeed())
            {

                if (dataGrid1.SelectedRows[0] != null)
                {
                    var editRow = dataGrid1.SelectedRows[0];
                    dialog.EditType = 2;
                    dialog.FeedId = Convert.ToInt16(editRow.Cells["Id"].Value);
                    dialog.textBox1.Text = editRow.Cells["FeedCity"].Value.ToString();
                    dialog.textBox2.Text = editRow.Cells["FeedState"].Value.ToString();
                    dialog.textBox3.Text = editRow.Cells["FeedRssLink"].Value.ToString();
                    dialog.checkBox1.Checked = Convert.ToBoolean(editRow.Cells["FeedActive"].Value);
                    if (dialog.ShowDialog() == DialogResult.OK)
                    {
                        BindData(GetFeeds());
                    }
                }
                else
                    MessageBox.Show("Must select row");
            }
        }
예제 #4
0
 private void button2_Click(object sender, EventArgs e)
 {
     using (var dialog = new EditFeed())
     {
         if (dataGrid1.SelectedRows[0] != null)
         {
             var editRow = dataGrid1.SelectedRows[0];
             dialog.EditType          = 2;
             dialog.FeedId            = Convert.ToInt16(editRow.Cells["Id"].Value);
             dialog.textBox1.Text     = editRow.Cells["FeedCity"].Value.ToString();
             dialog.textBox2.Text     = editRow.Cells["FeedState"].Value.ToString();
             dialog.textBox3.Text     = editRow.Cells["FeedRssLink"].Value.ToString();
             dialog.checkBox1.Checked = Convert.ToBoolean(editRow.Cells["FeedActive"].Value);
             if (dialog.ShowDialog() == DialogResult.OK)
             {
                 BindData(GetFeeds());
             }
         }
         else
         {
             MessageBox.Show("Must select row");
         }
     }
 }