public MainWindow() { InitializeComponent(); _stu = new Student(); var binding = new System.Windows.Data.Binding(); binding.Source = _stu; binding.Path = new PropertyPath("Name"); BindingOperations.SetBinding(TextBox, TextBox.TextProperty, binding); var stuList = new List <Student> { new Student { Id = 0, Name = "Time", Age = 29 }, new Student { Id = 2, Name = "Tom", Age = 28 }, new Student { Id = 4, Name = "Vina", Age = 27 } }; ListBoxStudents.ItemsSource = stuList; //ListBoxStudents.DisplayMemberPath = "Name"; var binding2 = new System.Windows.Data.Binding("SelectedItem.Id") { Source = ListBoxStudents }; TextBoxID.SetBinding(TextBox.TextProperty, binding2); }
private void BtnAdd_Click(object sender, EventArgs e) { phoneBindingSource.Add(new Phone()); phoneBindingSource.MoveLast(); Edit(false); TextBoxID.Focus(); }
private void ButtonNew_Click(object sender, EventArgs e) { _ClassFillTree.FillTree(TreeViewMain, _ClassSelect.SelectOpration("TableHustingCauseways"), TableHustingCauseways.GroupID, TableHustingCauseways.ID, TableHustingCauseways.NameLng1, TableHustingCauseways.IsGroup); _TypeOperation = ClassPublicVar.TypeOperation.Add; ToolsStatus(); TextBoxID.Focus(); }
protected void Page_Load(object sender, EventArgs e) { TextFecha.Text = (DateTime.Now.Year + "-" + DateTime.Now.Month + "-" + DateTime.Now.Day); TextBoxID.Focus(); Utilidades.SCritpValidacion(); if (!Page.IsPostBack) { LlenarDrop(); } }
public void ClearTextBoxes() { TextBox1.Clear(); TextBox2.Clear(); TextBox3.Clear(); TextBox4.Clear(); TextBox5.Clear(); TextBox6.Clear(); TextBox7.Clear(); TextBox8.Clear(); TextBoxID.Clear(); }
private void ClearButton_Click(object sender, RoutedEventArgs e) { TextBoxID.Clear(); TextBoxName.Clear(); TextBoxCompany.Clear(); TextBoxCity.Clear(); TextBoxCountry.Clear(); ListBoxLog.Items.Insert(0, ""); ListBoxLog.Items.Insert(0, DateTime.Now); ListBoxLog.Items.Insert(0, "USER CLEARED TEXT"); }
public WindowAddNewReport() { InitializeComponent(); DataContext = this; EnteredValue = string.Empty; TextAbout = "Для каждого отчета должен быть указан уникальный идентификатор." + Environment.NewLine + "Он должен состоять из латинских букв (регистр не важен) и / или цифр, но не должен содержать пробелов." + Environment.NewLine + "Идентификатор используется для запуска запланированного задания в системном планировщике заданий."; Loaded += (s, e) => { TextBoxID.Focus(); }; }
//ClassPublicVar.TypeOperation _TypeOperation; // لفحص القيمة المدخلة هل هي موجوده مسبقا او لا\TextboxID دالة فحص public void SearchID(DataTable DtID) { foreach (DataRow row in DtID.Rows) { if (row[TableCostCenter.ID].ToString() == TextBoxID.Text) { MessageBox.Show("موجود مسبقا"); TextBoxID.Focus(); TextBoxID.Clear(); break; } } }
private void ButtonNew_Click(object sender, EventArgs e) { try { _ClassFillTree.FillTree(TreeViewMain, _ClassSelect.SelectOpration("TableBanks"), TableBanks.GroupID, TableBanks.ID, TableBanks.NameLng1, TableBanks.IsGroup); _TypeOperation = ClassPublicVar.TypeOperation.Add; ToolsStatus(); TextBoxID.Focus(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void Button2_Click(object sender, RoutedEventArgs e) { if (!int.TryParse(TextBoxID.Text, out int id)) { MessageBox.Show("Unesite ceo broj"); TextBoxID.Clear(); TextBoxID.Focus(); return; } SqlDataAdapter da = new SqlDataAdapter("SELECT KupacId as Id, ImeKompanije as Firma, KontaktOsoba as Kontakt FROM Prodaja.Kupci", Konekcija.cnnTSQL2018); da.MissingSchemaAction = MissingSchemaAction.AddWithKey; //preuz info o primary key DataSet ds = new DataSet(); //netipizirani ds DataRow dr = null; try { da.Fill(ds, "Kupci"); DataTable tbl = ds.Tables[0]; dr = tbl.Rows.Find(id); } catch (Exception xcp) { MessageBox.Show(xcp.Message); return; } StringBuilder sb = new StringBuilder(); if (dr != null) { sb.AppendLine(dr[0].ToString()); sb.AppendLine(dr[1].ToString()); sb.AppendLine(dr[2].ToString()); } else { sb.AppendLine("Ne postoji kupac ciji je id: " + id); } TextBlock1.Text = sb.ToString(); }
private void ButtonNew_Click(object sender, EventArgs e) { try { _TypeOperation = ClassPublicVar.TypeOperation.Add; // تغيير حالة الادوات ToolsStatus(); // تعبئة الكمبوبوكس ComboBox_Fill(); TextBoxID.Focus(); _ClassFillTree.FillTree(TreeViewMain, _ClassSelect.SelectOpration("TableChatOfAccount"), TableChatOfAccount.GroupID, TableChatOfAccount.ID, TableChatOfAccount.NameLng1, TableChatOfAccount.IsGroup); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void ButtonSave_Click(object sender, EventArgs e) { try { string IDNew = ""; if (TextBoxID.Text != "" && TextBoxID.Text != " ") { // Add if (_TypeOperation == ClassPublicVar.TypeOperation.Add) { if (TextBoxGroupID.Text != "" && TextBoxGroupID.Text != " ") { if (RadioBtnGroup.Checked) { _ClassInsert.InsertOpration(new string[] { TableCostCenter.ID, TableCostCenter.GroupID, TableCostCenter.GroupName, TableCostCenter.NameLng1 , TableCostCenter.NameLng2, TableCostCenter.IsGroup } , new string[] { TextBoxID.Text, TextBoxGroupID.Text, TextBoxGroupName.Text, TextBoxNameLng1.Text, TextBoxNameLng2.Text, "1" } , "TableCostCenter" , true ); } else if (RadioBtnNotGroup.Checked) { _ClassInsert.InsertOpration(new string[] { TableCostCenter.ID, TableCostCenter.GroupID, TableCostCenter.GroupName, TableCostCenter.NameLng1 , TableCostCenter.NameLng2, TableCostCenter.IsGroup } , new string[] { TextBoxID.Text, TextBoxGroupID.Text, TextBoxGroupName.Text, TextBoxNameLng1.Text, TextBoxNameLng2.Text, "0" } , "TableCostCenter" , true ); } } else if (TextBoxGroupID.Text == "" || TextBoxGroupID.Text == " ") { _ClassInsert.InsertOpration(new string[] { TableCostCenter.ID, TableCostCenter.GroupID, TableCostCenter.GroupName, TableCostCenter.NameLng1 , TableCostCenter.NameLng2, TableCostCenter.IsGroup } , new string[] { TextBoxID.Text, "0", "Root", TextBoxNameLng1.Text, TextBoxNameLng2.Text, "0" } , "TableCostCenter" , true ); } } // Edit else if (_TypeOperation == ClassPublicVar.TypeOperation.Edit) { if (TextBoxGroupID.Text != "" && TextBoxGroupID.Text != " ") { if (RadioBtnGroup.Checked) { _ClassUpdate.UpdateOpration(new string[] { TableCostCenter.ID, TableCostCenter.GroupID, TableCostCenter.GroupName, TableCostCenter.NameLng1 , TableCostCenter.NameLng2, TableCostCenter.IsGroup } , new string[] { TextBoxID.Text, TextBoxGroupID.Text, TextBoxGroupName.Text, TextBoxNameLng1.Text, TextBoxNameLng2.Text, "1" } , new string[] { TableCostCenter.ID }, new string[] { NodeID } , "TableCostCenter", true); } else if (RadioBtnNotGroup.Checked) { _ClassUpdate.UpdateOpration(new string[] { TableCostCenter.ID, TableCostCenter.GroupID, TableCostCenter.GroupName, TableCostCenter.NameLng1 , TableCostCenter.NameLng2, TableCostCenter.IsGroup } , new string[] { TextBoxID.Text, TextBoxGroupID.Text, TextBoxGroupName.Text, TextBoxNameLng1.Text, TextBoxNameLng2.Text, "0" } , new string[] { TableCostCenter.ID }, new string[] { NodeID } , "TableCostCenter", true); } } else if (TextBoxGroupID.Text == "" || TextBoxGroupID.Text == " ") { _ClassUpdate.UpdateOpration(new string[] { TableCostCenter.ID, TableCostCenter.GroupID, TableCostCenter.GroupName, TableCostCenter.NameLng1 , TableCostCenter.NameLng2, TableCostCenter.IsGroup } , new string[] { TextBoxID.Text, "0", "Root", TextBoxNameLng1.Text, TextBoxNameLng2.Text, "0" } , new string[] { TableCostCenter.ID }, new string[] { NodeID } , "TableCostCenter", true); } } // عرض النود الجديد IDNew = TextBoxID.Text; _TypeOperation = ClassPublicVar.TypeOperation.Show; _ClassFillTree.FillTree(TreeViewMain, _ClassSelect.SelectOpration("TableCostCenter"), TableCostCenter.GroupID, TableCostCenter.ID, TableCostCenter.NameLng1, TableCostCenter.IsGroup); ToolsStatus(); _ClassTreeViewController.SelectfromTree(ref TreeViewMain, IDNew); // FormCostCenter_Load(sender, e); //_ClassFillTree.FillTree(TreeViewMain, _ClassSelect.SelectOpration("TableCostCenter"), TableCostCenter.GroupID, TableCostCenter.ID, TableCostCenter.NameLng1, TableCostCenter.IsGroup); } else { MessageBox.Show("لم يتم إدخال رقم كود", "خطأ في الإدخال", MessageBoxButtons.OK, MessageBoxIcon.Error); TextBoxID.Focus(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void ToolsStatus() { if (_TypeOperation == ClassPublicVar.TypeOperation.Show) { TextBoxMainID.ReadOnly = true; TextBoxMainName.ReadOnly = true; TextBoxID.ReadOnly = true; TextBoxGroupID.ReadOnly = true; TextBoxGroupName.ReadOnly = true; TextBoxNameLng1.ReadOnly = true; TextBoxNameLng2.ReadOnly = true; TextBoxPhone.ReadOnly = true; TextBoxeFax.ReadOnly = true; TextBoxAddress.ReadOnly = true; TextBoxRentStartDate.ReadOnly = true; TextBoxRentEndDate.ReadOnly = true; TextBoxCrNO.ReadOnly = true; TextBoxCrLssDate.ReadOnly = true; TextBoxCrExpDate.ReadOnly = true; TextBoxMunicp.ReadOnly = true; TextBoxMunicpLssDate.ReadOnly = true; TextBoxMunicpExpDate.ReadOnly = true; TxtBoxAdvocatteship.ReadOnly = true; TxtBoxAdvocatteshipLssDate.ReadOnly = true; TxtBoxAdvocatteshipExpDate.ReadOnly = true; ButtonNew.Enabled = true; ButtonEdit.Enabled = true; ButtonSave.Enabled = false; ButtonDelete.Enabled = true; ButtonPrint.Enabled = true; ButtonSearch.Enabled = true; ButtonCancel.Enabled = false; ButtonExit.Enabled = true; TreeViewMain.Enabled = true; RadioBtnGroup.Enabled = false; RadioBtnNotGroup.Enabled = false; buttonGroupSearch.Enabled = false; ButtonLast.Enabled = true; ButtonNext.Enabled = true; ButtonPrevious.Enabled = true; ButtonFirst.Enabled = true; TextBoxMainID.Clear(); TextBoxMainName.Clear(); TextBoxID.Clear(); TextBoxGroupID.Clear(); TextBoxGroupName.Clear(); TextBoxNameLng1.Clear(); TextBoxNameLng2.Clear(); TextBoxPhone.Clear(); TextBoxeFax.Clear(); TextBoxAddress.Clear(); TextBoxRentStartDate.Clear(); TextBoxRentEndDate.Clear(); TextBoxCrNO.Clear(); TextBoxCrLssDate.Clear(); TextBoxCrExpDate.Clear(); TextBoxMunicp.Clear(); TextBoxMunicpLssDate.Clear(); TextBoxMunicpExpDate.Clear(); TxtBoxAdvocatteship.Clear(); TxtBoxAdvocatteshipLssDate.Clear(); TxtBoxAdvocatteshipExpDate.Clear(); } else if (_TypeOperation == ClassPublicVar.TypeOperation.Add) { TextBoxMainID.ReadOnly = false; TextBoxMainName.ReadOnly = false; TextBoxID.ReadOnly = false; TextBoxGroupID.ReadOnly = false; TextBoxGroupName.ReadOnly = true; TextBoxNameLng1.ReadOnly = false; TextBoxNameLng2.ReadOnly = false; TextBoxPhone.ReadOnly = false; TextBoxeFax.ReadOnly = false; TextBoxAddress.ReadOnly = false; TextBoxRentStartDate.ReadOnly = false; TextBoxRentEndDate.ReadOnly = false; TextBoxCrNO.ReadOnly = false; TextBoxCrLssDate.ReadOnly = false; TextBoxCrExpDate.ReadOnly = false; TextBoxMunicp.ReadOnly = false; TextBoxMunicpLssDate.ReadOnly = false; TextBoxMunicpExpDate.ReadOnly = false; TxtBoxAdvocatteship.ReadOnly = false; TxtBoxAdvocatteshipLssDate.ReadOnly = false; TxtBoxAdvocatteshipExpDate.ReadOnly = false; RadioBtnNotGroup.Checked = true; ButtonNew.Enabled = true; ButtonEdit.Enabled = false; ButtonSave.Enabled = true; ButtonDelete.Enabled = false; ButtonPrint.Enabled = false; ButtonSearch.Enabled = false; ButtonCancel.Enabled = true; ButtonExit.Enabled = false; TreeViewMain.Enabled = false; RadioBtnGroup.Enabled = true; RadioBtnNotGroup.Enabled = true; buttonGroupSearch.Enabled = true; ButtonLast.Enabled = false; ButtonNext.Enabled = false; ButtonPrevious.Enabled = false; ButtonFirst.Enabled = false; TextBoxMainID.Clear(); TextBoxMainName.Clear(); TextBoxID.Clear(); TextBoxGroupID.Clear(); TextBoxGroupName.Clear(); TextBoxNameLng1.Clear(); TextBoxNameLng2.Clear(); TextBoxPhone.Clear(); TextBoxeFax.Clear(); TextBoxAddress.Clear(); TextBoxRentStartDate.Clear(); TextBoxRentEndDate.Clear(); TextBoxCrNO.Clear(); TextBoxCrLssDate.Clear(); TextBoxCrExpDate.Clear(); TextBoxMunicp.Clear(); TextBoxMunicpLssDate.Clear(); TextBoxMunicpExpDate.Clear(); TxtBoxAdvocatteship.Clear(); TxtBoxAdvocatteshipLssDate.Clear(); TxtBoxAdvocatteshipExpDate.Clear(); } else if (_TypeOperation == ClassPublicVar.TypeOperation.Edit) { TextBoxMainID.ReadOnly = false; TextBoxMainName.ReadOnly = false; TextBoxID.ReadOnly = true; TextBoxGroupID.ReadOnly = false; TextBoxGroupName.ReadOnly = true; TextBoxNameLng1.ReadOnly = false; TextBoxNameLng2.ReadOnly = false; TextBoxPhone.ReadOnly = false; TextBoxeFax.ReadOnly = false; TextBoxAddress.ReadOnly = false; TextBoxRentStartDate.ReadOnly = false; TextBoxRentEndDate.ReadOnly = false; TextBoxCrNO.ReadOnly = false; TextBoxCrLssDate.ReadOnly = false; TextBoxCrExpDate.ReadOnly = false; TextBoxMunicp.ReadOnly = false; TextBoxMunicpLssDate.ReadOnly = false; TextBoxMunicpExpDate.ReadOnly = false; TxtBoxAdvocatteship.ReadOnly = false; TxtBoxAdvocatteshipLssDate.ReadOnly = false; TxtBoxAdvocatteshipExpDate.ReadOnly = false; ButtonNew.Enabled = false; ButtonEdit.Enabled = false; ButtonSave.Enabled = true; ButtonDelete.Enabled = false; ButtonPrint.Enabled = false; ButtonSearch.Enabled = false; ButtonCancel.Enabled = true; ButtonExit.Enabled = false; TreeViewMain.Enabled = false; RadioBtnGroup.Enabled = true; RadioBtnNotGroup.Enabled = true; buttonGroupSearch.Enabled = true; ButtonLast.Enabled = false; ButtonNext.Enabled = false; ButtonPrevious.Enabled = false; ButtonFirst.Enabled = false; //TextBoxMainID.Clear(); //TextBoxMainName.Clear(); //TextBoxID.Clear(); //TextBoxGroupID.Clear(); //TextBoxGroupName.Clear(); //TextBoxNameLng1.Clear(); //TextBoxNameLng2.Clear(); //TextBoxPhone.Clear(); //TextBoxeFax.Clear(); //TextBoxAddress.Clear(); //TextBoxRentStartDate.Clear(); //TextBoxRentEndDate.Clear(); //TextBoxCrNO.Clear(); //TextBoxCrLssDate.Clear(); //TextBoxCrExpDate.Clear(); //TextBoxMunicp.Clear(); //TextBoxMunicpLssDate.Clear(); //TextBoxMunicpExpDate.Clear(); //TxtBoxAdvocatteship.Clear(); //TxtBoxAdvocatteshipLssDate.Clear(); //TxtBoxAdvocatteshipExpDate.Clear(); } }
private void BtnEdit_Click(object sender, EventArgs e) { Edit(false); TextBoxID.Focus(); }
private void ToolsStatus() { if (_TypeOperation == ClassPublicVar.TypeOperation.Show) { TextBoxID.ReadOnly = true; TextBoxGroupID.ReadOnly = true; TextBoxGroupName.ReadOnly = true; TextBoxNameLng1.ReadOnly = true; TextBoxNameLng2.ReadOnly = true; TextBoxAddress.ReadOnly = true; TextBoxCity.ReadOnly = true; TextBoxEmail.ReadOnly = true; TextBoxTelephone1.ReadOnly = true; TextBoxTelephone2.ReadOnly = true; TextBoxFax.ReadOnly = true; TextBoxMobile.ReadOnly = true; TextBoxCreditLimit.ReadOnly = true; TextBoxDebitTrans.ReadOnly = true; TextBoxCreditTrans.ReadOnly = true; TextBoxBalance.ReadOnly = true; ButtonNew.Enabled = true; ButtonEdit.Enabled = true; ButtonSave.Enabled = false; ButtonDelete.Enabled = true; ButtonPrint.Enabled = true; ButtonSearch.Enabled = true; ButtonCancel.Enabled = false; ButtonExit.Enabled = true; TreeViewMain.Enabled = true; RadioBtnGroup.Enabled = false; RadioBtnNotGroup.Enabled = false; buttonGroupSearch.Enabled = false; ButtonExit.Enabled = true; ButtonLast.Enabled = true; ButtonNext.Enabled = true; ButtonPrevious.Enabled = true; ButtonFirst.Enabled = true; TextBoxID.Clear(); TextBoxGroupID.Clear(); TextBoxGroupName.Clear(); TextBoxNameLng1.Clear(); TextBoxNameLng2.Clear(); TextBoxAddress.Clear(); TextBoxCity.Clear(); TextBoxEmail.Clear(); TextBoxTelephone1.Clear(); TextBoxTelephone2.Clear(); TextBoxFax.Clear(); TextBoxMobile.Clear(); TextBoxCreditLimit.Clear(); TextBoxDebitTrans.Clear(); TextBoxCreditTrans.Clear(); TextBoxBalance.Clear(); } else if (_TypeOperation == ClassPublicVar.TypeOperation.Add) { TextBoxID.ReadOnly = false; TextBoxGroupID.ReadOnly = false; TextBoxGroupName.ReadOnly = true; TextBoxNameLng1.ReadOnly = false; TextBoxNameLng2.ReadOnly = false; TextBoxAddress.ReadOnly = false; TextBoxCity.ReadOnly = false; TextBoxEmail.ReadOnly = false; TextBoxTelephone1.ReadOnly = false; TextBoxTelephone2.ReadOnly = false; TextBoxFax.ReadOnly = false; TextBoxMobile.ReadOnly = false; TextBoxCreditLimit.ReadOnly = false; TextBoxDebitTrans.ReadOnly = false; TextBoxCreditTrans.ReadOnly = false; TextBoxBalance.ReadOnly = false; ButtonNew.Enabled = true; ButtonEdit.Enabled = false; ButtonSave.Enabled = true; ButtonDelete.Enabled = false; ButtonPrint.Enabled = false; ButtonSearch.Enabled = false; ButtonCancel.Enabled = true; ButtonExit.Enabled = false; TreeViewMain.Enabled = false; RadioBtnGroup.Enabled = true; RadioBtnNotGroup.Enabled = true; buttonGroupSearch.Enabled = true; ButtonExit.Enabled = false; ButtonLast.Enabled = false; ButtonNext.Enabled = false; ButtonPrevious.Enabled = false; ButtonFirst.Enabled = false; TextBoxID.Clear(); TextBoxGroupID.Clear(); TextBoxGroupName.Clear(); TextBoxNameLng1.Clear(); TextBoxNameLng2.Clear(); TextBoxAddress.Clear(); TextBoxCity.Clear(); TextBoxEmail.Clear(); TextBoxTelephone1.Clear(); TextBoxTelephone2.Clear(); TextBoxFax.Clear(); TextBoxMobile.Clear(); TextBoxCreditLimit.Clear(); TextBoxDebitTrans.Clear(); TextBoxCreditTrans.Clear(); TextBoxBalance.Clear(); } else if (_TypeOperation == ClassPublicVar.TypeOperation.Edit) { TextBoxID.ReadOnly = true; TextBoxGroupID.ReadOnly = false; TextBoxGroupName.ReadOnly = true; TextBoxNameLng1.ReadOnly = false; TextBoxNameLng2.ReadOnly = false; TextBoxAddress.ReadOnly = false; TextBoxCity.ReadOnly = false; TextBoxEmail.ReadOnly = false; TextBoxTelephone1.ReadOnly = false; TextBoxTelephone2.ReadOnly = false; TextBoxFax.ReadOnly = false; TextBoxMobile.ReadOnly = false; TextBoxCreditLimit.ReadOnly = false; TextBoxDebitTrans.ReadOnly = false; TextBoxCreditTrans.ReadOnly = false; TextBoxBalance.ReadOnly = false; ButtonNew.Enabled = true; ButtonEdit.Enabled = false; ButtonSave.Enabled = true; ButtonDelete.Enabled = false; ButtonPrint.Enabled = false; ButtonSearch.Enabled = false; ButtonCancel.Enabled = true; ButtonExit.Enabled = false; TreeViewMain.Enabled = false; RadioBtnGroup.Enabled = true; RadioBtnNotGroup.Enabled = true; buttonGroupSearch.Enabled = true; ButtonLast.Enabled = false; ButtonNext.Enabled = false; ButtonPrevious.Enabled = false; ButtonFirst.Enabled = false; //TextBoxID.Clear(); //TextBoxGroupID.Clear(); //TextBoxGroupName.Clear(); //TextBoxNameLng1.Clear(); //TextBoxNameLng2.Clear(); //TextBoxAddress.Clear(); //TextBoxCity.Clear(); //TextBoxEmail.Clear(); //TextBoxTelephone1.Clear(); //TextBoxTelephone2.Clear(); //TextBoxFax.Clear(); //TextBoxMobile.Clear(); //TextBoxCreditLimit.Clear(); //TextBoxDebitTrans.Clear(); //TextBoxCreditTrans.Clear(); //TextBoxBalance.Clear(); } }
private void ButtonSave_Click(object sender, EventArgs e) { try { string IDNew = ""; if (TextBoxID.Text != "" && TextBoxID.Text != " ") { if (_TypeOperation == ClassPublicVar.TypeOperation.Add) { if (TextBoxGroupID.Text != "" && TextBoxGroupID.Text != " ") { if (RadioBtnGroup.Checked) { _ClassInsert.InsertOpration(new string[] { TableCustomer.IDMain, TableCustomer.ID, TableCustomer.GroupID, TableCustomer.GroupName, TableCustomer.NameLng1, TableCustomer.NameLng2, TableCustomer.IsGroup, TableCustomer.Address, TableCustomer.City, TableCustomer.Email, TableCustomer.Telephone1, TableCustomer.Telephone2, TableCustomer.Fax, TableCustomer.Mobile, TableCustomer.CreditLimit, TableCustomer.DebitTrans, TableCustomer.CreditTrans, TableCustomer.Balance } , new string[] { TextBoxMainID.Text, TextBoxID.Text, TextBoxGroupID.Text, TextBoxGroupName.Text, TextBoxNameLng1.Text, TextBoxNameLng2.Text, "1", TextBoxAddress.Text, TextBoxCity.Text, TextBoxEmail.Text, TextBoxTelephone1.Text, TextBoxTelephone2.Text, TextBoxFax.Text, TextBoxMobile.Text, TextBoxCreditLimit.Text, TextBoxDebitTrans.Text, TextBoxCreditTrans.Text, TextBoxBalance.Text } , "TableCustomer" , true ); } else if (RadioBtnNotGroup.Checked) { _ClassInsert.InsertOpration(new string[] { TableCustomer.IDMain, TableCustomer.ID, TableCustomer.GroupID, TableCustomer.GroupName, TableCustomer.NameLng1, TableCustomer.NameLng2, TableCustomer.IsGroup, TableCustomer.Address, TableCustomer.City, TableCustomer.Email, TableCustomer.Telephone1, TableCustomer.Telephone2, TableCustomer.Fax, TableCustomer.Mobile, TableCustomer.CreditLimit, TableCustomer.DebitTrans, TableCustomer.CreditTrans, TableCustomer.Balance } , new string[] { TextBoxMainID.Text, TextBoxID.Text, TextBoxGroupID.Text, TextBoxGroupName.Text, TextBoxNameLng1.Text, TextBoxNameLng2.Text, "0", TextBoxAddress.Text, TextBoxCity.Text, TextBoxEmail.Text, TextBoxTelephone1.Text, TextBoxTelephone2.Text, TextBoxFax.Text, TextBoxMobile.Text, TextBoxCreditLimit.Text, TextBoxDebitTrans.Text, TextBoxCreditTrans.Text, TextBoxBalance.Text } , "TableCustomer" , true ); } } else if (TextBoxGroupID.Text == "" || TextBoxGroupID.Text == " ") { _ClassInsert.InsertOpration(new string[] { TableCustomer.IDMain, TableCustomer.ID, TableCustomer.GroupID, TableCustomer.GroupName, TableCustomer.NameLng1, TableCustomer.NameLng2, TableCustomer.IsGroup, TableCustomer.Address, TableCustomer.City, TableCustomer.Email, TableCustomer.Telephone1, TableCustomer.Telephone2, TableCustomer.Fax, TableCustomer.Mobile, TableCustomer.CreditLimit, TableCustomer.DebitTrans, TableCustomer.CreditTrans, TableCustomer.Balance } , new string[] { TextBoxMainID.Text, TextBoxID.Text, "0", "Root", TextBoxNameLng1.Text, TextBoxNameLng2.Text, "0", TextBoxAddress.Text, TextBoxCity.Text, TextBoxEmail.Text, TextBoxTelephone1.Text, TextBoxTelephone2.Text, TextBoxFax.Text, TextBoxMobile.Text, TextBoxCreditLimit.Text, TextBoxDebitTrans.Text, TextBoxCreditTrans.Text, TextBoxBalance.Text } , "TableCustomer" , true ); } } else if (_TypeOperation == ClassPublicVar.TypeOperation.Edit) { if (TextBoxGroupID.Text != "" && TextBoxGroupID.Text != " ") { if (RadioBtnGroup.Checked) { _ClassUpdate.UpdateOpration(new string[] { TableCustomer.IDMain, TableCustomer.ID, TableCustomer.GroupID, TableCustomer.GroupName, TableCustomer.NameLng1, TableCustomer.NameLng2, TableCustomer.IsGroup, TableCustomer.Address, TableCustomer.City, TableCustomer.Email, TableCustomer.Telephone1, TableCustomer.Telephone2, TableCustomer.Fax, TableCustomer.Mobile, TableCustomer.CreditLimit, TableCustomer.DebitTrans, TableCustomer.CreditTrans, TableCustomer.Balance } , new string[] { TextBoxMainID.Text, TextBoxID.Text, TextBoxGroupID.Text, TextBoxGroupName.Text, TextBoxNameLng1.Text, TextBoxNameLng2.Text, "1", TextBoxAddress.Text, TextBoxCity.Text, TextBoxEmail.Text, TextBoxTelephone1.Text, TextBoxTelephone2.Text, TextBoxFax.Text, TextBoxMobile.Text, TextBoxCreditLimit.Text, TextBoxDebitTrans.Text, TextBoxCreditTrans.Text, TextBoxBalance.Text } , new string[] { TableCustomer.ID }, new string[] { NodeID } , "TableCustomer", true); } else if (RadioBtnNotGroup.Checked) { _ClassUpdate.UpdateOpration(new string[] { TableCustomer.ID, TableCustomer.GroupID, TableCustomer.GroupName, TableCustomer.NameLng1, TableCustomer.NameLng2, TableCustomer.IsGroup, TableCustomer.Address, TableCustomer.City, TableCustomer.Email, TableCustomer.Telephone1, TableCustomer.Telephone2, TableCustomer.Fax, TableCustomer.Mobile, TableCustomer.CreditLimit, TableCustomer.DebitTrans, TableCustomer.CreditTrans, TableCustomer.Balance } , new string[] { TextBoxMainID.Text, TextBoxID.Text, TextBoxGroupID.Text, TextBoxGroupName.Text, TextBoxNameLng1.Text, TextBoxNameLng2.Text, "0", TextBoxAddress.Text, TextBoxCity.Text, TextBoxEmail.Text, TextBoxTelephone1.Text, TextBoxTelephone2.Text, TextBoxFax.Text, TextBoxMobile.Text, TextBoxCreditLimit.Text, TextBoxDebitTrans.Text, TextBoxCreditTrans.Text, TextBoxBalance.Text } , new string[] { TableCustomer.ID }, new string[] { NodeID } , "TableCustomer", true); } } else if (TextBoxGroupID.Text == "" || TextBoxGroupID.Text == " ") { _ClassUpdate.UpdateOpration(new string[] { TableCustomer.ID, TableCustomer.GroupID, TableCustomer.GroupName, TableCustomer.NameLng1, TableCustomer.NameLng2, TableCustomer.IsGroup, TableCustomer.Address, TableCustomer.City, TableCustomer.Email, TableCustomer.Telephone1, TableCustomer.Telephone2, TableCustomer.Fax, TableCustomer.Mobile, TableCustomer.CreditLimit, TableCustomer.DebitTrans, TableCustomer.CreditTrans, TableCustomer.Balance } , new string[] { TextBoxMainID.Text, TextBoxID.Text, "0", "Root", TextBoxNameLng1.Text, TextBoxNameLng2.Text, "0", TextBoxAddress.Text, TextBoxCity.Text, TextBoxEmail.Text, TextBoxTelephone1.Text, TextBoxTelephone2.Text, TextBoxFax.Text, TextBoxMobile.Text, TextBoxCreditLimit.Text, TextBoxDebitTrans.Text, TextBoxCreditTrans.Text, TextBoxBalance.Text } , new string[] { TableCustomer.ID }, new string[] { NodeID } , "TableCustomer", true); } } // عرض النود الجديد IDNew = TextBoxID.Text; _TypeOperation = ClassPublicVar.TypeOperation.Show; _ClassFillTree.FillTree(TreeViewMain, _ClassSelect.SelectOpration("TableCustomer"), TableCustomer.GroupID , TableCustomer.ID, TableCustomer.NameLng1, TableCustomer.IsGroup); ToolsStatus(); _ClassTreeViewController.SelectfromTree(ref TreeViewMain, IDNew); //FormCustomers_Load( sender, e); } else { MessageBox.Show("لم يتم إدخال رقم كود", "خطأ في الإدخال", MessageBoxButtons.OK, MessageBoxIcon.Error); TextBoxID.Focus(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void timer_focus_Tick(object sender, EventArgs e) { TextBoxID.Select(); }
private void ButtonSave_Click(object sender, EventArgs e) { try { string IDNew = ""; if (TextBoxID.Text != "" && TextBoxID.Text != " ") { if (_TypeOperation == ClassPublicVar.TypeOperation.Add) { if (TextBoxGroupID.Text != "" && TextBoxGroupID.Text != " ") { if (RadioBtnGroup.Checked) { _ClassInsert.InsertOpration(new string[] { TableChatOfAccount.ID, TableChatOfAccount.GroupID, TableChatOfAccount.GroupName, TableChatOfAccount.NameLng1 , TableChatOfAccount.NameLng2, TableChatOfAccount.Class, TableChatOfAccount.AccNaut , TableChatOfAccount.Status, TableChatOfAccount.TotalCredit, TableChatOfAccount.TotalDebit , TableChatOfAccount.Balacne, TableChatOfAccount.CreditLimit, TableChatOfAccount.Posting , TableChatOfAccount.IsGroup } , new string[] { TextBoxID.Text, TextBoxGroupID.Text, TextBoxGroupName.Text, TextBoxNameLng1.Text, TextBoxNameLng2.Text , ComboBoxClass.Text, CompBoxAccNaut.Text, CompBoxStatus.Text, TextBoxTotalCredit.Text , TextBoxeTotalDebit.Text, TextBoxBalacne.Text, TextBoxCreditLimit.Text, CompBoxPosting.Text , "1" } , "TableChatOfAccount" , true ); } else if (RadioBtnNotGroup.Checked) { _ClassInsert.InsertOpration(new string[] { TableChatOfAccount.ID, TableChatOfAccount.GroupID, TableChatOfAccount.GroupName, TableChatOfAccount.NameLng1 , TableChatOfAccount.NameLng2, TableChatOfAccount.Class, TableChatOfAccount.AccNaut , TableChatOfAccount.Status, TableChatOfAccount.TotalCredit, TableChatOfAccount.TotalDebit , TableChatOfAccount.Balacne, TableChatOfAccount.CreditLimit, TableChatOfAccount.Posting , TableChatOfAccount.IsGroup } , new string[] { TextBoxID.Text, TextBoxGroupID.Text, TextBoxGroupName.Text, TextBoxNameLng1.Text, TextBoxNameLng2.Text , ComboBoxClass.Text, CompBoxAccNaut.Text, CompBoxStatus.Text, TextBoxTotalCredit.Text , TextBoxeTotalDebit.Text, TextBoxBalacne.Text, TextBoxCreditLimit.Text, CompBoxPosting.Text , "0" } , "TableChatOfAccount" , true ); } } else if (TextBoxGroupID.Text == "" || TextBoxGroupID.Text == " ") { _ClassInsert.InsertOpration(new string[] { TableChatOfAccount.ID, TableChatOfAccount.GroupID, TableChatOfAccount.GroupName, TableChatOfAccount.NameLng1 , TableChatOfAccount.NameLng2, TableChatOfAccount.Class, TableChatOfAccount.AccNaut , TableChatOfAccount.Status, TableChatOfAccount.TotalCredit, TableChatOfAccount.TotalDebit , TableChatOfAccount.Balacne, TableChatOfAccount.CreditLimit, TableChatOfAccount.Posting , TableChatOfAccount.IsGroup } , new string[] { TextBoxID.Text, "0", "Root", TextBoxNameLng1.Text, TextBoxNameLng2.Text , ComboBoxClass.Text, CompBoxAccNaut.Text, CompBoxStatus.Text, TextBoxTotalCredit.Text , TextBoxeTotalDebit.Text, TextBoxBalacne.Text, TextBoxCreditLimit.Text, CompBoxPosting.Text , "0" } , "TableChatOfAccount" , true ); } } else if (_TypeOperation == ClassPublicVar.TypeOperation.Edit) { if (TextBoxGroupID.Text != "" && TextBoxGroupID.Text != " ") { if (RadioBtnGroup.Checked) { _ClassUpdate.UpdateOpration(new string[] { TableChatOfAccount.ID, TableChatOfAccount.GroupID, TableChatOfAccount.GroupName, TableChatOfAccount.NameLng1 , TableChatOfAccount.NameLng2, TableChatOfAccount.Class, TableChatOfAccount.AccNaut , TableChatOfAccount.Status, TableChatOfAccount.TotalCredit, TableChatOfAccount.TotalDebit , TableChatOfAccount.Balacne, TableChatOfAccount.CreditLimit, TableChatOfAccount.Posting , TableChatOfAccount.IsGroup } , new string[] { TextBoxID.Text, TextBoxGroupID.Text, TextBoxGroupName.Text, TextBoxNameLng1.Text, TextBoxNameLng2.Text , ComboBoxClass.Text, CompBoxAccNaut.Text, CompBoxStatus.Text, TextBoxTotalCredit.Text , TextBoxeTotalDebit.Text, TextBoxBalacne.Text, TextBoxCreditLimit.Text, CompBoxPosting.Text , "1" } , new string[] { TableChatOfAccount.ID }, new string[] { NodeID } , "TableChatOfAccount", true); } else if (RadioBtnNotGroup.Checked) { _ClassUpdate.UpdateOpration(new string[] { TableChatOfAccount.ID, TableChatOfAccount.GroupID, TableChatOfAccount.GroupName, TableChatOfAccount.NameLng1 , TableChatOfAccount.NameLng2, TableChatOfAccount.Class, TableChatOfAccount.AccNaut , TableChatOfAccount.Status, TableChatOfAccount.TotalCredit, TableChatOfAccount.TotalDebit , TableChatOfAccount.Balacne, TableChatOfAccount.CreditLimit, TableChatOfAccount.Posting , TableChatOfAccount.IsGroup } , new string[] { TextBoxID.Text, TextBoxGroupID.Text, TextBoxGroupName.Text, TextBoxNameLng1.Text, TextBoxNameLng2.Text , ComboBoxClass.Text, CompBoxAccNaut.Text, CompBoxStatus.Text, TextBoxTotalCredit.Text , TextBoxeTotalDebit.Text, TextBoxBalacne.Text, TextBoxCreditLimit.Text, CompBoxPosting.Text , "0" } , new string[] { TableChatOfAccount.ID }, new string[] { NodeID } , "TableChatOfAccount", true); } } else if (TextBoxGroupID.Text == "" || TextBoxGroupID.Text == " ") { _ClassUpdate.UpdateOpration(new string[] { TableChatOfAccount.ID, TableChatOfAccount.GroupID, TableChatOfAccount.GroupName, TableChatOfAccount.NameLng1 , TableChatOfAccount.NameLng2, TableChatOfAccount.Class, TableChatOfAccount.AccNaut , TableChatOfAccount.Status, TableChatOfAccount.TotalCredit, TableChatOfAccount.TotalDebit , TableChatOfAccount.Balacne, TableChatOfAccount.CreditLimit, TableChatOfAccount.Posting , TableChatOfAccount.IsGroup } , new string[] { TextBoxID.Text, "0", "Root", TextBoxNameLng1.Text, TextBoxNameLng2.Text , ComboBoxClass.Text, CompBoxAccNaut.Text, CompBoxStatus.Text, TextBoxTotalCredit.Text , TextBoxeTotalDebit.Text, TextBoxBalacne.Text, TextBoxCreditLimit.Text, CompBoxPosting.Text , "0" } , new string[] { TableChatOfAccount.ID }, new string[] { NodeID } , "TableChatOfAccount", true); } } // عرض النود الجديد IDNew = TextBoxID.Text; _TypeOperation = ClassPublicVar.TypeOperation.Show; _ClassFillTree.FillTree(TreeViewMain, _ClassSelect.SelectOpration("TableChatOfAccount"), TableChatOfAccount.GroupID, TableChatOfAccount.ID, TableChatOfAccount.NameLng1, TableChatOfAccount.IsGroup); ToolsStatus(); _ClassTreeViewController.SelectfromTree(ref TreeViewMain, IDNew); //FormChatOfAccount_Load(sender, e); } else { MessageBox.Show("لم يتم إدخال رقم كود", "خطأ في الإدخال", MessageBoxButtons.OK, MessageBoxIcon.Error); TextBoxID.Focus(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
//public void SearchGroupID(DataTable DTGroupID) //{ // foreach (DataRow row in DtID.Rows) // { // object sss = row[TableCostCenter.ID]; // if (sss = DBNull.Value) // { // MessageBox.Show("غير موجود"); // TextBoxID.Focus(); // break; // } // } //} private void ToolsStatus() { if (_TypeOperation == ClassPublicVar.TypeOperation.Show) { TextBoxID.ReadOnly = true; TextBoxGroupID.ReadOnly = true; TextBoxGroupName.ReadOnly = true; TextBoxNameLng1.ReadOnly = true; TextBoxNameLng2.ReadOnly = true; ButtonNew.Enabled = true; ButtonEdit.Enabled = true; ButtonSave.Enabled = false; ButtonDelete.Enabled = true; ButtonPrint.Enabled = true; ButtonSearch.Enabled = true; ButtonCancel.Enabled = false; ButtonExit.Enabled = true; TreeViewMain.Enabled = true; RadioBtnGroup.Enabled = false; RadioBtnNotGroup.Enabled = false; buttonGroupSearch.Enabled = false; ButtonLast.Enabled = true; ButtonNext.Enabled = true; ButtonPrevious.Enabled = true; ButtonFirst.Enabled = true; TextBoxID.Clear(); TextBoxGroupID.Clear(); TextBoxGroupName.Clear(); TextBoxNameLng1.Clear(); TextBoxNameLng2.Clear(); } else if (_TypeOperation == ClassPublicVar.TypeOperation.Add) { TextBoxID.ReadOnly = false; TextBoxGroupID.ReadOnly = false; TextBoxGroupName.ReadOnly = true; TextBoxNameLng1.ReadOnly = false; TextBoxNameLng2.ReadOnly = false; RadioBtnNotGroup.Checked = true; ButtonNew.Enabled = true; ButtonEdit.Enabled = false; ButtonSave.Enabled = true; ButtonDelete.Enabled = false; ButtonPrint.Enabled = false; ButtonSearch.Enabled = false; ButtonCancel.Enabled = true; ButtonExit.Enabled = false; RadioBtnGroup.Enabled = true; RadioBtnNotGroup.Enabled = true; buttonGroupSearch.Enabled = true; TreeViewMain.Enabled = false; ButtonLast.Enabled = false; ButtonNext.Enabled = false; ButtonPrevious.Enabled = false; ButtonFirst.Enabled = false; TextBoxID.Clear(); TextBoxGroupID.Clear(); TextBoxGroupName.Clear(); TextBoxNameLng1.Clear(); TextBoxNameLng2.Clear(); } else if (_TypeOperation == ClassPublicVar.TypeOperation.Edit) { TextBoxID.ReadOnly = true; TextBoxGroupID.ReadOnly = false; TextBoxGroupName.ReadOnly = true; TextBoxNameLng1.ReadOnly = false; TextBoxNameLng2.ReadOnly = false; ButtonNew.Enabled = false; ButtonEdit.Enabled = false; ButtonSave.Enabled = true; ButtonDelete.Enabled = false; ButtonPrint.Enabled = false; ButtonSearch.Enabled = false; ButtonCancel.Enabled = true; ButtonExit.Enabled = false; RadioBtnGroup.Enabled = true; RadioBtnNotGroup.Enabled = true; buttonGroupSearch.Enabled = true; TreeViewMain.Enabled = false; ButtonLast.Enabled = false; ButtonNext.Enabled = false; ButtonPrevious.Enabled = false; ButtonFirst.Enabled = false; //TextBoxID.Clear(); //TextBoxGroupID.Clear(); //TextBoxGroupName.Clear(); //TextBoxNameLng1.Clear(); //TextBoxNameLng2.Clear(); } }
protected void SaveRaceResultOrder_Click(object sender, EventArgs e) { Global gl = new Global(); string CompCode = gl.GetCompetitionCode(); //Int32 EventLineNo = Convert.ToInt32(gl.GetCompetitionEventNo()); string EventLineNoText = Request.QueryString.Get("Event"); Int32 EventLineNo = Convert.ToInt32(EventLineNoText); AthleticsEntities1 AthlEnt = new AthleticsEntities1(); AthleticCompetitionCRUD AthlCRUD = new AthleticCompetitionCRUD(); Athl_CompetitorsInEvent AthlCompetitorsInEventRec = new Athl_CompetitorsInEvent(); Athl_CompetitionEvents AthlCompEvent = new Athl_CompetitionEvents(); string TextBoxID; string CurrValue; Int32 CurrValueInt; bool NeedToUpdateOrderByResults = false; string[] ControlNameParts; Int32 LineNoForTextBox; Int32 BibNo = 0; CurrValue = ""; LineNoForTextBox = -1; AthlCompEvent = AthlCRUD.GetCompetitionEvent(CompCode, EventLineNo); foreach (Control item in PH1.Controls) { if (item is TextBox) { TextBox t1 = (TextBox)PH1.FindControl(item.ID); TextBoxID = t1.ID; CurrValue = t1.Text; ControlNameParts = TextBoxID.Split('_'); LineNoForTextBox = Convert.ToInt32(ControlNameParts[1]); BibNo = gl.GetBibNoArrayElement(LineNoForTextBox); bool res = Int32.TryParse(CurrValue, out CurrValueInt); if (res == false) { CurrValueInt = 0; } if (CurrValueInt.ToString() != gl.GetArr1Value(LineNoForTextBox)) { AthlCompetitorsInEventRec = AthlCRUD.GetCompetitorInEvent(CompCode, BibNo, EventLineNo); AthlCRUD.UpdCompetitorInEvent(AthlCompetitorsInEventRec.mot, AthlCompetitorsInEventRec.greinarnumer, AthlCompetitorsInEventRec.rasnumer, AthlCompetitorsInEventRec.timi, AthlCompetitorsInEventRec.metrar, AthlCompetitorsInEventRec.vindur, AthlCompetitorsInEventRec.arangur, AthlCompetitorsInEventRec.tilraun1, AthlCompetitorsInEventRec.vindur1, AthlCompetitorsInEventRec.tilraun2, AthlCompetitorsInEventRec.vindur2, AthlCompetitorsInEventRec.tilraun3, AthlCompetitorsInEventRec.vindur3, AthlCompetitorsInEventRec.tilraun4, AthlCompetitorsInEventRec.vindur4, AthlCompetitorsInEventRec.tilraun5, AthlCompetitorsInEventRec.vindur5, AthlCompetitorsInEventRec.tilraun6, AthlCompetitorsInEventRec.vindur6, AthlCompetitorsInEventRec.seria, AthlCompetitorsInEventRec.rafmagnstimataka, AthlCompetitorsInEventRec.merking1, AthlCompetitorsInEventRec.merking2, AthlCompetitorsInEventRec.merking3, AthlCompetitorsInEventRec.merking4, AthlCompetitorsInEventRec.merking5, AthlCompetitorsInEventRec.merking6, AthlCompetitorsInEventRec.sortorder1, AthlCompetitorsInEventRec.sortorder2, CurrValueInt, "", AthlCompetitorsInEventRec.samasaetiognaestiaundan, AthlCompetitorsInEventRec.athugasemd, AthlCompetitorsInEventRec.ridillnumer, AthlCompetitorsInEventRec.stokkkastrod, AthlCompetitorsInEventRec.IAAF_Stig, AthlCompetitorsInEventRec.thrautarstig, AthlCompetitorsInEventRec.Unglingastig, AthlCompetitorsInEventRec.PerformaceRemarks); NeedToUpdateOrderByResults = true; } } //if (item is CheckBox) //{ // CheckBox c1 = (CheckBox)PH1.FindControl(item.ID); // CheckBoxID = c1.ID; // CurrChecked = (Boolean)(c1.Checked); // ControlNameParts = CheckBoxID.Split('_'); // LineNoForCheckBox = Convert.ToInt32(ControlNameParts[1]); //} //if ((LineNoForTextBox > 0) && (LineNoForCheckBox > 0) && (LineNoForTextBox == LineNoForCheckBox)) //{ // if (CurrChecked == true) // { // CurrCheckedInteger = 1; // } // else // { // CurrCheckedInteger = 0; // } // string Test = gl.GetArr1Value(LineNoForTextBox); // Test = gl.GetArr2Value(LineNoForCheckBox); // Test = CurrChecked.ToString(); // bool res = Int32.TryParse(CurrValue, out CurrValueInt); // if (res == false) // { // CurrValueInt = 0; // } // if ((CurrValueInt.ToString() != gl.GetArr1Value(LineNoForTextBox)) || (CurrCheckedInteger.ToString() != gl.GetArr2Value(LineNoForCheckBox))) // { // AthlCompetitorsInEventRec = AthlCRUD.GetCompetitorInEvent(CompCode, BibNo, EventLineNo); // AthlCRUD.UpdCompetitorInEvent(AthlCompetitorsInEventRec.mot, AthlCompetitorsInEventRec.greinarnumer, // AthlCompetitorsInEventRec.rasnumer, AthlCompetitorsInEventRec.timi, AthlCompetitorsInEventRec.metrar, // AthlCompetitorsInEventRec.vindur, AthlCompetitorsInEventRec.arangur, // AthlCompetitorsInEventRec.tilraun1, AthlCompetitorsInEventRec.vindur1, // AthlCompetitorsInEventRec.tilraun2, AthlCompetitorsInEventRec.vindur2, // AthlCompetitorsInEventRec.tilraun3, AthlCompetitorsInEventRec.vindur3, // AthlCompetitorsInEventRec.tilraun4, AthlCompetitorsInEventRec.vindur4, // AthlCompetitorsInEventRec.tilraun5, AthlCompetitorsInEventRec.vindur5, // AthlCompetitorsInEventRec.tilraun6, AthlCompetitorsInEventRec.vindur6, // AthlCompetitorsInEventRec.seria, // AthlCompetitorsInEventRec.rafmagnstimataka, AthlCompetitorsInEventRec.merking1, AthlCompetitorsInEventRec.merking2, // AthlCompetitorsInEventRec.merking3, AthlCompetitorsInEventRec.merking4, AthlCompetitorsInEventRec.merking5, // AthlCompetitorsInEventRec.merking6, AthlCompetitorsInEventRec.sortorder1, AthlCompetitorsInEventRec.sortorder2, // CurrValueInt, "", CurrCheckedInteger, // AthlCompetitorsInEventRec.athugasemd); // NeedToUpdateOrderByResults = true; // } // LineNoForCheckBox = -1; // LineNoForTextBox = -1; //} } // if (NeedToUpdateOrderByResults == true) // { // gl.UpdateResultOrderForEvent(CompCode, EventLineNo, AthlCompEvent.tegundgreinar, "%"); // AthlCRUD.UpdateResultOrder(CompCode, EventLineNo, AthlCompEvent.tegundgreinar); // } Response.Redirect("UpdateEventResults.aspx?Event=" + EventLineNoText); }