private void checkmultitable() { Fixed_management.FixedDataSet fixedDataSet = ((Fixed_management.FixedDataSet)(this.FindResource("fixedDataSet"))); // 将数据加载到表 nature 中。可以根据需要修改此代码。 Fixed_management.FixedDataSetTableAdapters.natureTableAdapter fixedDataSetnatureTableAdapter = new Fixed_management.FixedDataSetTableAdapters.natureTableAdapter(); System.Windows.Data.CollectionViewSource natureViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("natureViewSource"))); Fixed_management.FixedDataSetTableAdapters.categoryTableAdapter fixedDataSetcategoryTableAdapter = new Fixed_management.FixedDataSetTableAdapters.categoryTableAdapter(); System.Windows.Data.CollectionViewSource categoryViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("categoryViewSource"))); Fixed_management.FixedDataSetTableAdapters.designationTableAdapter fixedDataSetdesignationTableAdapter = new Fixed_management.FixedDataSetTableAdapters.designationTableAdapter(); System.Windows.Data.CollectionViewSource designationViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("designationViewSource"))); Fixed_management.FixedDataSetTableAdapters.specificationsTableAdapter fixedDataSetspecificationsTableAdapter = new Fixed_management.FixedDataSetTableAdapters.specificationsTableAdapter(); System.Windows.Data.CollectionViewSource specificationsViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("specificationsViewSource"))); Fixed_management.FixedDataSetTableAdapters.modelTableAdapter fixedDataSetmodelTableAdapter = new Fixed_management.FixedDataSetTableAdapters.modelTableAdapter(); System.Windows.Data.CollectionViewSource modelViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("modelViewSource"))); Fixed_management.FixedDataSetTableAdapters.purchase_wayTableAdapter fixedDataSetpurchase_wayTableAdapter = new Fixed_management.FixedDataSetTableAdapters.purchase_wayTableAdapter(); System.Windows.Data.CollectionViewSource purchase_wayViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("purchase_wayViewSource"))); Fixed_management.FixedDataSetTableAdapters.unitTableAdapter fixedDataSetunitTableAdapter = new Fixed_management.FixedDataSetTableAdapters.unitTableAdapter(); System.Windows.Data.CollectionViewSource unitViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("unitViewSource"))); Fixed_management.FixedDataSetTableAdapters.keeperTableAdapter fixedDataSetkeeperTableAdapter = new Fixed_management.FixedDataSetTableAdapters.keeperTableAdapter(); System.Windows.Data.CollectionViewSource keeperViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("keeperViewSource"))); Fixed_management.FixedDataSetTableAdapters.supplierTableAdapter fixedDataSetsupplierTableAdapter = new Fixed_management.FixedDataSetTableAdapters.supplierTableAdapter(); System.Windows.Data.CollectionViewSource supplierViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("supplierViewSource"))); Fixed_management.FixedDataSetTableAdapters.positionTableAdapter fixedDataSetpositionTableAdapter = new Fixed_management.FixedDataSetTableAdapters.positionTableAdapter(); System.Windows.Data.CollectionViewSource positionViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("positionViewSource"))); Fixed_management.FixedDataSetTableAdapters.fixed_statusTableAdapter fixedDataSetfixed_statusTableAdapter = new Fixed_management.FixedDataSetTableAdapters.fixed_statusTableAdapter(); System.Windows.Data.CollectionViewSource fixed_statusViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("fixed_statusViewSource"))); Fixed_management.FixedDataSetTableAdapters.storage_placeTableAdapter fixedDataSetstorage_placeTableAdapter = new Fixed_management.FixedDataSetTableAdapters.storage_placeTableAdapter(); System.Windows.Data.CollectionViewSource storage_placeViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("storage_placeViewSource"))); Fixed_management.FixedDataSetTableAdapters.affiliatedTableAdapter fixedDataSetaffiliatedTableAdapter = new Fixed_management.FixedDataSetTableAdapters.affiliatedTableAdapter(); System.Windows.Data.CollectionViewSource affiliatedViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("affiliatedViewSource"))); Fixed_management.FixedDataSetTableAdapters.departmentTableAdapter fixedDataSetdepartmentTableAdapter = new Fixed_management.FixedDataSetTableAdapters.departmentTableAdapter(); System.Windows.Data.CollectionViewSource departmentViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("departmentViewSource"))); Fixed_management.FixedDataSetTableAdapters.userTableAdapter fixedDataSetuserTableAdapter = new Fixed_management.FixedDataSetTableAdapters.userTableAdapter(); System.Windows.Data.CollectionViewSource userViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("userViewSource"))); var nature = (from c in fixedDataSet.nature where c.nature == natureC1ComboBox.Text select c).Count(); var category = (from c in fixedDataSet.category where c.category == categoryC1ComboBox.Text select c).Count(); var designation = (from c in fixedDataSet.designation where c.designation == designationC1ComboBox.Text select c).Count(); var specifications = (from c in fixedDataSet.specifications where c.specifications == specifications_IDC1ComboBox.Text select c).Count(); var model = (from c in fixedDataSet.model where c.model == model_IDC1ComboBox.Text select c).Count(); var purchase_way = (from c in fixedDataSet.purchase_way where c.purchase_way == purchase_way_IDC1ComboBox.Text select c).Count(); var unit = (from c in fixedDataSet.unit where c.unit == unit_IDC1ComboBox.Text select c).Count(); var keeper = (from c in fixedDataSet.keeper where c.keeper == keeper_IDC1ComboBox.Text select c).Count(); var supplier = (from c in fixedDataSet.supplier where c.supplier == supplier_IDC1ComboBox.Text select c).Count(); var position = (from c in fixedDataSet.position where c.position == position_IDC1ComboBox.Text select c).Count(); var fixed_status = (from c in fixedDataSet.fixed_status where c.fixed_status == fixed_status_IDC1ComboBox.Text select c).Count(); var storage_place = (from c in fixedDataSet.storage_place where c.storage_place == storage_place_IDC1ComboBox.Text select c).Count(); var affiliated = (from c in fixedDataSet.affiliated where c.affiliated == affiliated_IDC1ComboBox.Text select c).Count(); var department = (from c in fixedDataSet.department where c.department == department_IDC1ComboBox.Text select c).Count(); var user = (from c in fixedDataSet.user where c.user == user_IDC1ComboBox.Text select c).Count(); if (nature == 0) { fixedDataSet.nature.AddnatureRow(natureC1ComboBox.Text); fixedDataSetnatureTableAdapter.Update(fixedDataSet.nature); fixedDataSetnatureTableAdapter.Fill(fixedDataSet.nature); natureViewSource.View.MoveCurrentToLast(); } if (category == 0) { fixedDataSet.category.AddcategoryRow(categoryC1ComboBox.Text); fixedDataSetcategoryTableAdapter.Update(fixedDataSet.category); fixedDataSetcategoryTableAdapter.Fill(fixedDataSet.category); categoryViewSource.View.MoveCurrentToLast(); } if (designation == 0) { fixedDataSet.designation.AdddesignationRow(designationC1ComboBox.Text); fixedDataSetdesignationTableAdapter.Update(fixedDataSet.designation); fixedDataSetdesignationTableAdapter.Fill(fixedDataSet.designation); designationViewSource.View.MoveCurrentToLast(); } if (specifications == 0) { fixedDataSet.specifications.AddspecificationsRow(specifications_IDC1ComboBox.Text); fixedDataSetspecificationsTableAdapter.Update(fixedDataSet.specifications); fixedDataSetspecificationsTableAdapter.Fill(fixedDataSet.specifications); specificationsViewSource.View.MoveCurrentToLast(); } if (model == 0) { fixedDataSet.model.AddmodelRow(model_IDC1ComboBox.Text); fixedDataSetmodelTableAdapter.Update(fixedDataSet.model); fixedDataSetmodelTableAdapter.Fill(fixedDataSet.model); modelViewSource.View.MoveCurrentToLast(); } if (purchase_way == 0) { fixedDataSet.purchase_way.Addpurchase_wayRow(purchase_way_IDC1ComboBox.Text); fixedDataSetpurchase_wayTableAdapter.Update(fixedDataSet.purchase_way); fixedDataSetpurchase_wayTableAdapter.Fill(fixedDataSet.purchase_way); purchase_wayViewSource.View.MoveCurrentToLast(); } if (unit == 0) { fixedDataSet.unit.AddunitRow(unit_IDC1ComboBox.Text); fixedDataSetunitTableAdapter.Update(fixedDataSet.unit); fixedDataSetunitTableAdapter.Fill(fixedDataSet.unit); unitViewSource.View.MoveCurrentToLast(); } if (keeper == 0) { fixedDataSet.keeper.AddkeeperRow(keeper_IDC1ComboBox.Text); fixedDataSetkeeperTableAdapter.Update(fixedDataSet.keeper); fixedDataSetkeeperTableAdapter.Fill(fixedDataSet.keeper); keeperViewSource.View.MoveCurrentToLast(); } if (supplier == 0) { fixedDataSet.supplier.AddsupplierRow(supplier_IDC1ComboBox.Text); fixedDataSetsupplierTableAdapter.Update(fixedDataSet.supplier); fixedDataSetsupplierTableAdapter.Fill(fixedDataSet.supplier); supplierViewSource.View.MoveCurrentToLast(); } if (position == 0) { fixedDataSet.position.AddpositionRow(position_IDC1ComboBox.Text); fixedDataSetpositionTableAdapter.Update(fixedDataSet.position); fixedDataSetpositionTableAdapter.Fill(fixedDataSet.position); positionViewSource.View.MoveCurrentToLast(); } if (fixed_status == 0) { fixedDataSet.fixed_status.Addfixed_statusRow(fixed_status_IDC1ComboBox.Text); fixedDataSetfixed_statusTableAdapter.Update(fixedDataSet.fixed_status); fixedDataSetfixed_statusTableAdapter.Fill(fixedDataSet.fixed_status); fixed_statusViewSource.View.MoveCurrentToLast(); } if (storage_place == 0) { fixedDataSet.storage_place.Addstorage_placeRow(storage_place_IDC1ComboBox.Text); fixedDataSetstorage_placeTableAdapter.Update(fixedDataSet.storage_place); fixedDataSetstorage_placeTableAdapter.Fill(fixedDataSet.storage_place); storage_placeViewSource.View.MoveCurrentToLast(); } if (affiliated == 0) { fixedDataSet.affiliated.AddaffiliatedRow(1,affiliated_IDC1ComboBox.Text); fixedDataSetaffiliatedTableAdapter.Update(fixedDataSet.affiliated); fixedDataSetaffiliatedTableAdapter.Fill(fixedDataSet.affiliated); affiliatedViewSource.View.MoveCurrentToLast(); } if (department == 0) { fixedDataSet.department.AdddepartmentRow(1,department_IDC1ComboBox.Text); fixedDataSetdepartmentTableAdapter.Update(fixedDataSet.department); fixedDataSetdepartmentTableAdapter.Fill(fixedDataSet.department); departmentViewSource.View.MoveCurrentToLast(); } if (user == 0) { fixedDataSet.user.AdduserRow(user_IDC1ComboBox.Text); fixedDataSetuserTableAdapter.Update(fixedDataSet.user); fixedDataSetuserTableAdapter.Fill(fixedDataSet.user); userViewSource.View.MoveCurrentToLast(); } }
private void checkmultitable() { Fixed_management.FixedDataSet fixedDataSet = ((Fixed_management.FixedDataSet)(this.FindResource("fixedDataSet"))); Fixed_management.FixedDataSetTableAdapters.affiliatedTableAdapter fixedDataSetaffiliatedTableAdapter = new Fixed_management.FixedDataSetTableAdapters.affiliatedTableAdapter(); fixedDataSetaffiliatedTableAdapter.Fill(fixedDataSet.affiliated); System.Windows.Data.CollectionViewSource affiliatedViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("affiliatedViewSource"))); affiliatedViewSource.View.MoveCurrentToLast(); Fixed_management.FixedDataSetTableAdapters.departmentTableAdapter fixedDataSetdepartmentTableAdapter = new Fixed_management.FixedDataSetTableAdapters.departmentTableAdapter(); fixedDataSetdepartmentTableAdapter.Fill(fixedDataSet.department); System.Windows.Data.CollectionViewSource departmentViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("departmentViewSource"))); departmentViewSource.View.MoveCurrentToLast(); Fixed_management.FixedDataSetTableAdapters.keeperTableAdapter fixedDataSetkeeperTableAdapter = new Fixed_management.FixedDataSetTableAdapters.keeperTableAdapter(); fixedDataSetkeeperTableAdapter.Fill(fixedDataSet.keeper); System.Windows.Data.CollectionViewSource keeperViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("keeperViewSource"))); keeperViewSource.View.MoveCurrentToLast(); Fixed_management.FixedDataSetTableAdapters.storage_placeTableAdapter fixedDataSetstorage_placeTableAdapter = new Fixed_management.FixedDataSetTableAdapters.storage_placeTableAdapter(); fixedDataSetstorage_placeTableAdapter.Fill(fixedDataSet.storage_place); System.Windows.Data.CollectionViewSource storage_placeViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("storage_placeViewSource"))); storage_placeViewSource.View.MoveCurrentToLast(); //Fixed_management.FixedDataSetTableAdapters.transfer_detailTableAdapter transfer_detailTableAdapter = new Fixed_management.FixedDataSetTableAdapters.transfer_detailTableAdapter(); //transfer_detailTableAdapter.Fill(fixedDataSet.transfer_detail); //System.Windows.Data.CollectionViewSource transfer_detailViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("transfer_detailViewSource"))); //transfer_detailViewSource.View.MoveCurrentToLast(); var affiliated = (from c in fixedDataSet.affiliated where c.affiliated == affiliated_IDC1ComboBox.Text select c).Count(); var department = (from c in fixedDataSet.department where c.department == department_IDC1ComboBox.Text select c).Count(); var keeper = (from c in fixedDataSet.keeper where c.keeper == keeper_IDC1ComboBox.Text select c).Count(); var storage_place = (from c in fixedDataSet.storage_place where c.storage_place == storage_place_IDC1ComboBox.Text select c).Count(); if (affiliated == 0) { fixedDataSet.affiliated.AddaffiliatedRow(1, affiliated_IDC1ComboBox.Text); fixedDataSetaffiliatedTableAdapter.Update(fixedDataSet.affiliated); fixedDataSet.affiliated.AcceptChanges(); fixedDataSetaffiliatedTableAdapter.Fill(fixedDataSet.affiliated); affiliatedViewSource.View.MoveCurrentToLast(); } if (department == 0) { fixedDataSet.department.AdddepartmentRow(1, department_IDC1ComboBox.Text); fixedDataSetdepartmentTableAdapter.Update(fixedDataSet.department); fixedDataSet.department.AcceptChanges(); fixedDataSetdepartmentTableAdapter.Fill(fixedDataSet.department); departmentViewSource.View.MoveCurrentToLast(); } if (keeper == 0) { fixedDataSet.keeper.AddkeeperRow(keeper_IDC1ComboBox.Text); fixedDataSetkeeperTableAdapter.Update(fixedDataSet.keeper); fixedDataSet.keeper.AcceptChanges(); fixedDataSetkeeperTableAdapter.Fill(fixedDataSet.keeper); keeperViewSource.View.MoveCurrentToLast(); } if (storage_place == 0) { fixedDataSet.storage_place.Addstorage_placeRow(storage_place_IDC1ComboBox.Text); fixedDataSetstorage_placeTableAdapter.Update(fixedDataSet.storage_place); fixedDataSet.storage_place.AcceptChanges(); fixedDataSetstorage_placeTableAdapter.Fill(fixedDataSet.storage_place); storage_placeViewSource.View.MoveCurrentToLast(); } }
private void checkmultitable() { Fixed_management.FixedDataSet fixedDataSet = ((Fixed_management.FixedDataSet)(this.FindResource("fixedDataSet"))); // 将数据加载到表 nature 中。可以根据需要修改此代码。 Fixed_management.FixedDataSetTableAdapters.natureTableAdapter fixedDataSetnatureTableAdapter = new Fixed_management.FixedDataSetTableAdapters.natureTableAdapter(); System.Windows.Data.CollectionViewSource natureViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("natureViewSource"))); Fixed_management.FixedDataSetTableAdapters.categoryTableAdapter fixedDataSetcategoryTableAdapter = new Fixed_management.FixedDataSetTableAdapters.categoryTableAdapter(); System.Windows.Data.CollectionViewSource categoryViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("categoryViewSource"))); Fixed_management.FixedDataSetTableAdapters.designationTableAdapter fixedDataSetdesignationTableAdapter = new Fixed_management.FixedDataSetTableAdapters.designationTableAdapter(); System.Windows.Data.CollectionViewSource designationViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("designationViewSource"))); Fixed_management.FixedDataSetTableAdapters.specificationsTableAdapter fixedDataSetspecificationsTableAdapter = new Fixed_management.FixedDataSetTableAdapters.specificationsTableAdapter(); System.Windows.Data.CollectionViewSource specificationsViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("specificationsViewSource"))); Fixed_management.FixedDataSetTableAdapters.modelTableAdapter fixedDataSetmodelTableAdapter = new Fixed_management.FixedDataSetTableAdapters.modelTableAdapter(); System.Windows.Data.CollectionViewSource modelViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("modelViewSource"))); Fixed_management.FixedDataSetTableAdapters.purchase_wayTableAdapter fixedDataSetpurchase_wayTableAdapter = new Fixed_management.FixedDataSetTableAdapters.purchase_wayTableAdapter(); System.Windows.Data.CollectionViewSource purchase_wayViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("purchase_wayViewSource"))); Fixed_management.FixedDataSetTableAdapters.unitTableAdapter fixedDataSetunitTableAdapter = new Fixed_management.FixedDataSetTableAdapters.unitTableAdapter(); System.Windows.Data.CollectionViewSource unitViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("unitViewSource"))); Fixed_management.FixedDataSetTableAdapters.keeperTableAdapter fixedDataSetkeeperTableAdapter = new Fixed_management.FixedDataSetTableAdapters.keeperTableAdapter(); System.Windows.Data.CollectionViewSource keeperViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("keeperViewSource"))); Fixed_management.FixedDataSetTableAdapters.supplierTableAdapter fixedDataSetsupplierTableAdapter = new Fixed_management.FixedDataSetTableAdapters.supplierTableAdapter(); System.Windows.Data.CollectionViewSource supplierViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("supplierViewSource"))); Fixed_management.FixedDataSetTableAdapters.positionTableAdapter fixedDataSetpositionTableAdapter = new Fixed_management.FixedDataSetTableAdapters.positionTableAdapter(); System.Windows.Data.CollectionViewSource positionViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("positionViewSource"))); Fixed_management.FixedDataSetTableAdapters.fixed_statusTableAdapter fixedDataSetfixed_statusTableAdapter = new Fixed_management.FixedDataSetTableAdapters.fixed_statusTableAdapter(); System.Windows.Data.CollectionViewSource fixed_statusViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("fixed_statusViewSource"))); Fixed_management.FixedDataSetTableAdapters.storage_placeTableAdapter fixedDataSetstorage_placeTableAdapter = new Fixed_management.FixedDataSetTableAdapters.storage_placeTableAdapter(); System.Windows.Data.CollectionViewSource storage_placeViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("storage_placeViewSource"))); Fixed_management.FixedDataSetTableAdapters.affiliatedTableAdapter fixedDataSetaffiliatedTableAdapter = new Fixed_management.FixedDataSetTableAdapters.affiliatedTableAdapter(); System.Windows.Data.CollectionViewSource affiliatedViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("affiliatedViewSource"))); Fixed_management.FixedDataSetTableAdapters.departmentTableAdapter fixedDataSetdepartmentTableAdapter = new Fixed_management.FixedDataSetTableAdapters.departmentTableAdapter(); System.Windows.Data.CollectionViewSource departmentViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("departmentViewSource"))); Fixed_management.FixedDataSetTableAdapters.userTableAdapter fixedDataSetuserTableAdapter = new Fixed_management.FixedDataSetTableAdapters.userTableAdapter(); System.Windows.Data.CollectionViewSource userViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("userViewSource"))); var nature = (from c in fixedDataSet.nature where c.nature == natureC1ComboBox.Text select c).Count(); var category = (from c in fixedDataSet.category where c.category == categoryC1ComboBox.Text select c).Count(); var designation = (from c in fixedDataSet.designation where c.designation == designationC1ComboBox.Text select c).Count(); var specifications = (from c in fixedDataSet.specifications where c.specifications == specifications_IDC1ComboBox.Text select c).Count(); var model = (from c in fixedDataSet.model where c.model == model_IDC1ComboBox.Text select c).Count(); var purchase_way = (from c in fixedDataSet.purchase_way where c.purchase_way == purchase_way_IDC1ComboBox.Text select c).Count(); var unit = (from c in fixedDataSet.unit where c.unit == unit_IDC1ComboBox.Text select c).Count(); var keeper = (from c in fixedDataSet.keeper where c.keeper == keeper_IDC1ComboBox.Text select c).Count(); var supplier = (from c in fixedDataSet.supplier where c.supplier == supplier_IDC1ComboBox.Text select c).Count(); var position = (from c in fixedDataSet.position where c.position == position_IDC1ComboBox.Text select c).Count(); var fixed_status = (from c in fixedDataSet.fixed_status where c.fixed_status == fixed_status_IDC1ComboBox.Text select c).Count(); var storage_place = (from c in fixedDataSet.storage_place where c.storage_place == storage_place_IDC1ComboBox.Text select c).Count(); var affiliated = (from c in fixedDataSet.affiliated where c.affiliated == affiliated_IDC1ComboBox.Text select c).Count(); var department = (from c in fixedDataSet.department where c.department == department_IDC1ComboBox.Text select c).Count(); var user = (from c in fixedDataSet.user where c.user == user_IDC1ComboBox.Text select c).Count(); if (nature == 0) { fixedDataSet.nature.AddnatureRow(natureC1ComboBox.Text); fixedDataSetnatureTableAdapter.Update(fixedDataSet.nature); fixedDataSetnatureTableAdapter.Fill(fixedDataSet.nature); natureViewSource.View.MoveCurrentToLast(); } if (category == 0) { fixedDataSet.category.AddcategoryRow(categoryC1ComboBox.Text); fixedDataSetcategoryTableAdapter.Update(fixedDataSet.category); fixedDataSetcategoryTableAdapter.Fill(fixedDataSet.category); categoryViewSource.View.MoveCurrentToLast(); } if (designation == 0) { fixedDataSet.designation.AdddesignationRow(designationC1ComboBox.Text); fixedDataSetdesignationTableAdapter.Update(fixedDataSet.designation); fixedDataSetdesignationTableAdapter.Fill(fixedDataSet.designation); designationViewSource.View.MoveCurrentToLast(); } if (specifications == 0) { fixedDataSet.specifications.AddspecificationsRow(specifications_IDC1ComboBox.Text); fixedDataSetspecificationsTableAdapter.Update(fixedDataSet.specifications); fixedDataSetspecificationsTableAdapter.Fill(fixedDataSet.specifications); specificationsViewSource.View.MoveCurrentToLast(); } if (model == 0) { fixedDataSet.model.AddmodelRow(model_IDC1ComboBox.Text); fixedDataSetmodelTableAdapter.Update(fixedDataSet.model); fixedDataSetmodelTableAdapter.Fill(fixedDataSet.model); modelViewSource.View.MoveCurrentToLast(); } if (purchase_way == 0) { fixedDataSet.purchase_way.Addpurchase_wayRow(purchase_way_IDC1ComboBox.Text); fixedDataSetpurchase_wayTableAdapter.Update(fixedDataSet.purchase_way); fixedDataSetpurchase_wayTableAdapter.Fill(fixedDataSet.purchase_way); purchase_wayViewSource.View.MoveCurrentToLast(); } if (unit == 0) { fixedDataSet.unit.AddunitRow(unit_IDC1ComboBox.Text); fixedDataSetunitTableAdapter.Update(fixedDataSet.unit); fixedDataSetunitTableAdapter.Fill(fixedDataSet.unit); unitViewSource.View.MoveCurrentToLast(); } if (keeper == 0) { fixedDataSet.keeper.AddkeeperRow(keeper_IDC1ComboBox.Text); fixedDataSetkeeperTableAdapter.Update(fixedDataSet.keeper); fixedDataSetkeeperTableAdapter.Fill(fixedDataSet.keeper); keeperViewSource.View.MoveCurrentToLast(); } if (supplier == 0) { fixedDataSet.supplier.AddsupplierRow(supplier_IDC1ComboBox.Text); fixedDataSetsupplierTableAdapter.Update(fixedDataSet.supplier); fixedDataSetsupplierTableAdapter.Fill(fixedDataSet.supplier); supplierViewSource.View.MoveCurrentToLast(); } if (position == 0) { fixedDataSet.position.AddpositionRow(position_IDC1ComboBox.Text); fixedDataSetpositionTableAdapter.Update(fixedDataSet.position); fixedDataSetpositionTableAdapter.Fill(fixedDataSet.position); positionViewSource.View.MoveCurrentToLast(); } if (fixed_status == 0) { fixedDataSet.fixed_status.Addfixed_statusRow(fixed_status_IDC1ComboBox.Text); fixedDataSetfixed_statusTableAdapter.Update(fixedDataSet.fixed_status); fixedDataSetfixed_statusTableAdapter.Fill(fixedDataSet.fixed_status); fixed_statusViewSource.View.MoveCurrentToLast(); } if (storage_place == 0) { fixedDataSet.storage_place.Addstorage_placeRow(storage_place_IDC1ComboBox.Text); fixedDataSetstorage_placeTableAdapter.Update(fixedDataSet.storage_place); fixedDataSetstorage_placeTableAdapter.Fill(fixedDataSet.storage_place); storage_placeViewSource.View.MoveCurrentToLast(); } if (affiliated == 0) { fixedDataSet.affiliated.AddaffiliatedRow(1, affiliated_IDC1ComboBox.Text); fixedDataSetaffiliatedTableAdapter.Update(fixedDataSet.affiliated); fixedDataSetaffiliatedTableAdapter.Fill(fixedDataSet.affiliated); affiliatedViewSource.View.MoveCurrentToLast(); } if (department == 0) { fixedDataSet.department.AdddepartmentRow(1, department_IDC1ComboBox.Text); fixedDataSetdepartmentTableAdapter.Update(fixedDataSet.department); fixedDataSetdepartmentTableAdapter.Fill(fixedDataSet.department); departmentViewSource.View.MoveCurrentToLast(); } if (user == 0) { fixedDataSet.user.AdduserRow(user_IDC1ComboBox.Text); fixedDataSetuserTableAdapter.Update(fixedDataSet.user); fixedDataSetuserTableAdapter.Fill(fixedDataSet.user); userViewSource.View.MoveCurrentToLast(); } }