/// <summary> /// Load all EO data in response to the user selecting an EO from the tree. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ucTreeView1_TreeViewIDChanged(object sender, UCTreeView.TreeViewEventArgs e) { // Info from the tree itself _TypeIDSelected = e.ID; _TypeNameSelected = e.Name; DialogResult = DialogResult.OK; }
/// <summary> /// Load all EO data in response to the user selecting an EO from the tree. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ucTreeView1_TreeViewIDChanged(object sender, UCTreeView.TreeViewEventArgs e) { Initialized = false; // Info from the tree itself sEOTypeID = e.ID; teEventName.Text = e.Name; // Now use this info to go get the rest of the info string sql = "SELECT * FROM BEOType WHERE TypeID='" + sEOTypeID + "'"; DataTable temp = VWA4Common.DB.Retrieve(sql); if (temp != null && temp.Rows.Count > 0) { // Get the info from the record and load up the form deEODate.Text = temp.Rows[0]["EventDate"].ToString(); if (deEODate.Text != "") { deEODate.Text = DateTime.Parse(deEODate.Text).ToShortDateString(); } nEONumber.Value = int.Parse(temp.Rows[0]["BEONumber"].ToString()); ceGuestCount.Text = temp.Rows[0]["GuestCount"].ToString(); ceMFRatio.Text = temp.Rows[0]["MRatio"].ToString(); teReportingEventName.Text = temp.Rows[0]["ReportTypeName"].ToString(); teEventDescription.Text = temp.Rows[0]["Description"].ToString(); sClientID = temp.Rows[0]["Client"].ToString(); ckEOEnabled.Checked = bool.Parse(temp.Rows[0]["Enabled"].ToString()); // Find the right Client to show in the combo box cbEventClient.SelectedIndex = -1; for (int i = 0; i < cbEventClient.Items.Count; i++) { // if (sClientID == ((VWA4Common.VWACommon.MyListBoxItem)cbEventClient.Items[i]).ItemData) { cbEventClient.SelectedIndex = i; break; } } bSave.Show(); } else { MessageBox.Show("Error Retrieving Event Order Data!"); } Initialized = true; }
private void ucTreeView1_TreeViewIDChanged(object sender, UCTreeView.TreeViewEventArgs e) { // Use the BeforeEnterEditMode event to position the edit controls UltraGridCell objCell = this.ultraGrid1.ActiveCell; // This should be impossible, but its good practice to check // to make sure there is an active cell before continuing if (objCell == null) { return; } //if (VWA4Common.VWACommon.IsAllowEditVersion() && Regex.IsMatch(objCell.Column.Key, "TypeID")) if (Regex.IsMatch(objCell.Column.Key, "TypeID")) { objCell.SetValue(e.ID, true); ultraTextEditor1.CloseEditorButtonDropDowns(); } }
private void ucTreeView1_TreeViewIDChanged(object sender, UCTreeView.TreeViewEventArgs e) { if (ActiveControl.Parent == ultraOriginalType) { _RemapID = e.ID; } else { int idx = int.Parse(Regex.Replace(ActiveControl.Parent.Name, "ultraTextEditor", "")); // contro index if (_RemapList[e.ID] == null) // add two items to hash - for search by ID and by control index { if (_RemapList[idx] != null) //hash for this index alredy exists { _RemapList.Remove(((RemapItem)_RemapList[idx]).TypeID); } else { _RemapList.Add(idx, new RemapItem(e.ID, idx)); } _RemapList.Add(e.ID, new RemapItem(e.ID, idx)); } else { if (((RemapItem)_RemapList[e.ID]).Index != idx) { MessageBox.Show(this, "Error " + _Type + "Type already exists!", "Input Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } } if (ActiveControl.Parent.GetType() == typeof(UltraTextEditor)) { ((UltraTextEditor)this.ActiveControl.Parent).Value = e.Name; } ActiveControl.Parent.Focus(); this.ucTreeView1.Visible = false; }
//private void ulvTagList_Click(object sender, EventArgs e) //{ // if (ulvTagList.SelectedItems.Count <= 0) return; // // // string itemkey = ulvTagList.SelectedItems[0].Key; // CurrTag = (Tag)ulvTagList.SelectedItems[0].Tag; // // // LoadTaggedFoodTypes(CurrTag.ID); //} private void ucFoodTypes_TreeViewIDChanged(object sender, UCTreeView.TreeViewEventArgs e) { // if Food Type is not already in the tag list, add it TagsFoodType tftreturn = TagsFoodTypeList.Find( delegate(TagsFoodType tft) { return(tft.FoodTypeID == e.ID); } ); if (tftreturn == null) { // Food Type doesn't already exist - add it TagsFoodType tftnew = new TagsFoodType(); tftnew.FoodTypeID = e.ID; tftnew.FoodTypeName = e.Name; tftnew.TagID = CurrTag.ID; tftnew.TagName = CurrTag.TagName; int idret = TagsFoodTypeDAO.DAO.Insert(tftnew); LoadTaggedFoodTypes(tftnew.TagID); } ulvTagList.Focus(); }
private void ucTreeView1_TreeViewIDChanged(object sender, UCTreeView.TreeViewEventArgs e) { DataTable dataTable = new DataTable(); string sql; if (e.TypeCatalogID == "0" || e.TypeCatalogID == "") { sql = @"SELECT * FROM BEOType WHERE TypeID = '" + e.ID + "'"; } else { sql = @"SELECT TypeName, ReportTypeName, SpanishTypeName, Rank, BEOSubTypes.Enabled, Description, EventDate, BEONumber, GuestCount, " + " MRatio, CatID, BEOSubTypes.TypeID " + " FROM BEOSubTypes INNER JOIN BEOType ON BEOType.TypeID = BEOSubTypes.TypeID " + " WHERE TypeCatalogID = " + e.TypeCatalogID + " AND BEOSubTypes.TypeID = '" + e.ID + "'"; } dataTable = VWA4Common.DB.Retrieve(sql); if (dataTable.Rows.Count > 0) { txtName.Text = dataTable.Rows[0]["TypeName"].ToString(); txtReportName.Text = dataTable.Rows[0]["ReportTypeName"].ToString(); txtSpanishName.Text = dataTable.Rows[0]["SpanishTypeName"].ToString(); nRank.Value = int.Parse(dataTable.Rows[0]["Rank"].ToString() == "" ? "0" : dataTable.Rows[0]["Rank"].ToString()); chkEnabled.Checked = bool.Parse(dataTable.Rows[0]["Enabled"].ToString()); txtDescription.Text = dataTable.Rows[0]["Description"].ToString(); dtEventDate.Value = DateTime.Parse(dataTable.Rows[0]["EventDate"].ToString() == "" ? DateTime.Now.ToString() : dataTable.Rows[0]["EventDate"].ToString()); txtEventNumber.Text = dataTable.Rows[0]["BEONumber"].ToString(); nGuestNumber.Value = int.Parse(dataTable.Rows[0]["GuestCount"].ToString() == "" ? "0" : dataTable.Rows[0]["GuestCount"].ToString()); nRatio.Value = decimal.Parse(dataTable.Rows[0]["MRatio"].ToString() == "" ? "0" : dataTable.Rows[0]["MRatio"].ToString()); _CatID = e.CatID; _ID = e.ID; _TypeCatalog = e.TypeCatalogID; _Changed = false; } }
private void ucTreeView1_TreeViewIDChanged(object sender, UCTreeView.TreeViewEventArgs e) { UserTypeID = e.ID; teAwardRecipient.Text = e.Name; teAwardRecipient.CloseEditorButtonDropDowns(); }
private void ucTreeView1_TreeViewIDChanged(object sender, UCTreeView.TreeViewEventArgs e) { _TypeID = e.ID; _TypeName = e.Name; DialogResult = DialogResult.OK; }