Пример #1
0
            public override global::System.Data.DataTable Clone()
            {
                studentDataTable cln = ((studentDataTable)(base.Clone()));

                cln.InitVars();
                return(cln);
            }
Пример #2
0
            public override DataTable Clone()
            {
                studentDataTable cln = ((studentDataTable)(base.Clone()));

                cln.InitVars();
                return(cln);
            }
Пример #3
0
 internal void InitVars()
 {
     this.tablestudent = ((studentDataTable)(this.Tables["student"]));
     if ((this.tablestudent != null))
     {
         this.tablestudent.InitVars();
     }
 }
Пример #4
0
 private void InitClass()
 {
     this.DataSetName             = "DataSet1";
     this.Prefix                  = "";
     this.Namespace               = "http://tempuri.org/DataSet1.xsd";
     this.EnforceConstraints      = true;
     this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
     this.tablestudent            = new studentDataTable();
     base.Tables.Add(this.tablestudent);
 }
Пример #5
0
        public MainViewModel()
        {
            StudentTable = new studentDataTable();
            model        = new MainModel();

            ReadCommand   = new DelegateCommand(ReadDataBase);
            CreateCommand = new DelegateCommand(CreateDataBase, isSelected);
            UpdateCommand = new DelegateCommand(UpdateDataBase, isSelected);
            DeleteCommand = new DelegateCommand(DeleteDataBase, isSelected);
        }
Пример #6
0
 internal void InitVars(bool initTable)
 {
     this.tablestudent = ((studentDataTable)(base.Tables["student"]));
     if ((initTable == true))
     {
         if ((this.tablestudent != null))
         {
             this.tablestudent.InitVars();
         }
     }
 }
Пример #7
0
 private void InitClass()
 {
     this.DataSetName        = "dsStudent";
     this.Prefix             = "";
     this.Namespace          = "http://www.tempuri.org/dsStudent.xsd";
     this.Locale             = new System.Globalization.CultureInfo("zh-CN");
     this.CaseSensitive      = false;
     this.EnforceConstraints = true;
     this.tablestudent       = new studentDataTable();
     this.Tables.Add(this.tablestudent);
 }
Пример #8
0
 private void InitClass()
 {
     this.DataSetName             = "dsStudent";
     this.Prefix                  = "";
     this.Namespace               = "http://www.tempuri.org/dsStudent.xsd";
     this.Locale                  = new global::System.Globalization.CultureInfo("zh-CN");
     this.EnforceConstraints      = true;
     this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
     this.tablestudent            = new studentDataTable();
     base.Tables.Add(this.tablestudent);
 }
Пример #9
0
        public void ReadDataBase(object rowData)
        {
            studentDataTable temp = model.Read();

            StudentTable.Clear();

            foreach (studentRow row in temp)
            {
                StudentTable.ImportRow(row);
            }
        }
Пример #10
0
        public void DeleteDataBase(object rowData)
        {
            DataRowView      rowView = rowData as DataRowView;
            studentDataTable temp    = model.Delete(rowView);

            StudentTable.Clear();

            foreach (studentRow row in temp)
            {
                StudentTable.ImportRow(row);
            }
        }
Пример #11
0
        private studentDataTable LoadDataDase()
        {
            try
            {
                string query = "SELECT * FROM student";

                connection.Open();

                MySqlDataAdapter adapter   = new MySqlDataAdapter(query, connection);
                studentDataTable dataTable = new studentDataTable();

                adapter.Fill(dataTable);

                connection.Close();

                return(dataTable);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());

                return(null);
            }
        }
Пример #12
0
 internal studentRow(global::System.Data.DataRowBuilder rb) :
     base(rb)
 {
     this.tablestudent = ((studentDataTable)(this.Table));
 }
Пример #13
0
 internal studentRow(DataRowBuilder rb) :
     base(rb)
 {
     this.tablestudent = ((studentDataTable)(this.Table));
 }