Click here to Skip to main content
15,899,937 members
Home / Discussions / C#
   

C#

 
GeneralRe: Check who has taken the handle of the text file. Pin
Calla22-Feb-10 22:14
Calla22-Feb-10 22:14 
GeneralRe: Check who has taken the handle of the text file. Pin
Manoj_Leo23-Feb-10 6:42
Manoj_Leo23-Feb-10 6:42 
AnswerRe: Check who has taken the handle of the text file. Pin
Saksida Bojan23-Feb-10 1:31
Saksida Bojan23-Feb-10 1:31 
GeneralRe: Check who has taken the handle of the text file. Pin
Sunil G23-Feb-10 2:29
Sunil G23-Feb-10 2:29 
QuestionImage Interpolation Pin
Steven Schmoll22-Feb-10 18:40
Steven Schmoll22-Feb-10 18:40 
AnswerRe: Image Interpolation Pin
RichardM123-Feb-10 14:50
RichardM123-Feb-10 14:50 
GeneralRe: Image Interpolation Pin
Steven Schmoll23-Feb-10 16:43
Steven Schmoll23-Feb-10 16:43 
QuestionWarning Message box Pin
shahramkeyboard22-Feb-10 8:48
shahramkeyboard22-Feb-10 8:48 
I compile my form But view warning error
the error message is:Child list for field tblmembers cannot be created
My form Code is:
using System;
using System.Collections.Generic;
using System.Data.OleDb;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;
using DevComponents.DotNetBar.Rendering;

namespace Library_Project
{
    public partial class ViewInfo : Form
    {
        public ViewInfo()
        {
            InitializeComponent();
        }

        private void ViewInfo_Load(object sender, EventArgs e)
        {
            //----------DataGrid Member Header & View
            //---------------------------------------
            DataSet dsDataMember = null;
            memberBL thisMember = new memberBL();
            dsDataMember = thisMember.View();
            dataGridViewX1.DataBindings.Add(new Binding("DataSource", dsDataMember, "tblmembers"));
            dataGridViewX1.Columns[0].HeaderText = "کد عضو";
            dataGridViewX1.Columns[1].HeaderText = "نام عضو";
            dataGridViewX1.Columns[2].HeaderText = "نام خانوادگی";
            dataGridViewX1.Columns[3].HeaderText = "شماره شناسنامه";
            dataGridViewX1.Columns[4].HeaderText = "کد ملی";
            dataGridViewX1.Columns[5].HeaderText = "تاریخ تولد";
            dataGridViewX1.Columns[6].HeaderText = "شغل";
            dataGridViewX1.Columns[7].HeaderText = "تلفن";
            dataGridViewX1.Columns[8].HeaderText = "موبایل";
            dataGridViewX1.Columns[9].HeaderText = "ادرس";
            dataGridViewX1.Columns[10].HeaderText = "تاریخ عضویت";
            //----------DataGrid Book Header  & View
            //---------------------------------------
            DataSet dsDataBook = null;
            bookBL thisBook = new bookBL();
            dsDataBook = thisBook.View();
            dataGridViewX2.DataBindings.Add(new Binding("DataSource", dsDataBook, "tblbooks"));
            dataGridViewX2.Columns[0].HeaderText = "کد کتاب";
            dataGridViewX2.Columns[1].HeaderText = "نام کتاب";
            dataGridViewX2.Columns[2].HeaderText = "ناشر";
            dataGridViewX2.Columns[3].HeaderText = "مترجم";
            dataGridViewX2.Columns[4].HeaderText = "شابک";
            dataGridViewX2.Columns[5].HeaderText = "موضوع";
            //---------TextBox Members Information 
            //--------------------------------------
            try
            {
                textBox1.DataBindings.Add(new Binding("Text", dsDataMember, "tblmembers.membercode"));
                textBox2.DataBindings.Add(new Binding("Text", dsDataMember, "tblmembers.name"));
                textBox3.DataBindings.Add(new Binding("Text", dsDataMember, "tblmembers.family"));
                textBox4.DataBindings.Add(new Binding("Text", dsDataMember, "tblmembers.shsh"));
                textBox5.DataBindings.Add(new Binding("Text", dsDataMember, "tblmembers.melicode"));
                textBox6.DataBindings.Add(new Binding("Text", dsDataMember, "tblmembers.tavalod"));
                textBox7.DataBindings.Add(new Binding("Text", dsDataMember, "tblmembers.shoghl"));
                textBox8.DataBindings.Add(new Binding("Text", dsDataMember, "tblmembers.tel"));
                textBox9.DataBindings.Add(new Binding("Text", dsDataMember, "tblmembers.mobile"));
                textBox10.DataBindings.Add(new Binding("Text", dsDataMember, "tblmembers.adr"));
                textBox11.DataBindings.Add(new Binding("Text", dsDataMember, "tblmembers.trkhozv"));
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message.ToString());
            }

            //---------TextBox Members Information
            //--------------------------------------
            try
            {
                textBox12.DataBindings.Add(new Binding("Text", dsDataBook, "tblmembers.codebook"));
                textBox13.DataBindings.Add(new Binding("Text", dsDataBook, "tblmembers.bookname"));
                textBox14.DataBindings.Add(new Binding("Text", dsDataBook, "tblmembers.nasher"));
                textBox15.DataBindings.Add(new Binding("Text", dsDataBook, "tblmembers.motarjem"));
                textBox16.DataBindings.Add(new Binding("Text", dsDataBook, "tblmembers.shabok"));
                textBox17.DataBindings.Add(new Binding("Text", dsDataBook, "tblmembers.mozo"));
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message.ToString());

            }
        }

        private void dataGridViewX1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            textBox1.Text = dataGridViewX1.CurrentRow.Cells[0].Value.ToString();
            textBox2.Text = dataGridViewX1.CurrentRow.Cells[1].Value.ToString();
            textBox3.Text = dataGridViewX1.CurrentRow.Cells[2].Value.ToString();
            textBox4.Text = dataGridViewX1.CurrentRow.Cells[3].Value.ToString();
            textBox5.Text = dataGridViewX1.CurrentRow.Cells[4].Value.ToString();
            textBox6.Text = dataGridViewX1.CurrentRow.Cells[5].Value.ToString();
            textBox7.Text = dataGridViewX1.CurrentRow.Cells[6].Value.ToString();
            textBox8.Text = dataGridViewX1.CurrentRow.Cells[7].Value.ToString();
            textBox9.Text = dataGridViewX1.CurrentRow.Cells[8].Value.ToString();
            textBox10.Text = dataGridViewX1.CurrentRow.Cells[9].Value.ToString();

        }
    }
}

What is the Problem?
AnswerRe: Warning Message box Pin
Not Active22-Feb-10 11:54
mentorNot Active22-Feb-10 11:54 
QuestionC# .net.Mail Pin
Jamelon6922-Feb-10 8:19
Jamelon6922-Feb-10 8:19 
AnswerRe: C# .net.Mail Pin
DaveyM6922-Feb-10 8:29
professionalDaveyM6922-Feb-10 8:29 
AnswerRe: C# .net.Mail Pin
Dr.Walt Fair, PE22-Feb-10 8:31
professionalDr.Walt Fair, PE22-Feb-10 8:31 
AnswerRe: C# .net.Mail Pin
Gaurav Dudeja India22-Feb-10 19:20
Gaurav Dudeja India22-Feb-10 19:20 
AnswerRe: C# .net.Mail Pin
Richard MacCutchan22-Feb-10 22:16
mveRichard MacCutchan22-Feb-10 22:16 
QuestionBest way to read ASCII input [modified] Pin
spainchaud22-Feb-10 6:13
spainchaud22-Feb-10 6:13 
AnswerRe: Best way to read ASCII input Pin
harold aptroot22-Feb-10 6:32
harold aptroot22-Feb-10 6:32 
GeneralRe: Best way to read ASCII input Pin
spainchaud22-Feb-10 6:38
spainchaud22-Feb-10 6:38 
AnswerRe: Best way to read ASCII input [modified] Pin
Saksida Bojan22-Feb-10 6:36
Saksida Bojan22-Feb-10 6:36 
GeneralRe: Best way to read ASCII input Pin
harold aptroot22-Feb-10 6:39
harold aptroot22-Feb-10 6:39 
AnswerRe: Best way to read ASCII input Pin
Dr.Walt Fair, PE22-Feb-10 7:03
professionalDr.Walt Fair, PE22-Feb-10 7:03 
GeneralRe: Best way to read ASCII input Pin
spainchaud22-Feb-10 8:48
spainchaud22-Feb-10 8:48 
GeneralRe: Best way to read ASCII input Pin
Dr.Walt Fair, PE22-Feb-10 9:23
professionalDr.Walt Fair, PE22-Feb-10 9:23 
GeneralRe: Best way to read ASCII input Pin
Scott Serl22-Feb-10 10:13
Scott Serl22-Feb-10 10:13 
QuestionReports Pin
muka6622-Feb-10 3:22
muka6622-Feb-10 3:22 
AnswerRe: Reports Pin
Not Active22-Feb-10 3:42
mentorNot Active22-Feb-10 3:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.