private void GetAllOrders() { if (_is_waiter == true || _is_manager == true) { Details.Clear(); Details2.Clear(); Orders.Clear(); conn = new MySqlConnection("Server=localhost;Database=szakdoga_db;Uid=root;Pwd=;SslMode=none"); string q_select = "SELECT o.Order_no, o.Table_no, o.State, w.Realname as Waiter, o.Time FROM orders o INNER JOIN workers w ON w.Worker_ID = o.Waiter ORDER BY o.Order_no"; try { conn.Open(); MySqlCommand cmd = new MySqlCommand(q_select, conn); MySqlDataReader dataReader = cmd.ExecuteReader(); while (dataReader.Read()) { Orders.Add(new Model.Orders { Order_no = Convert.ToInt32(dataReader["Order_no"]), Table_no = Convert.ToInt32(dataReader["Table_no"]), State = dataReader["State"].ToString(), Waiter = dataReader["Waiter"].ToString(), Time = Convert.ToDateTime(dataReader["Time"]).ToString("MM.dd, H:mm"), }); } dataReader.Close(); this.DisplayPage = new Orders_Grid(); conn.Close(); } catch (MySqlException ex) { MessageBox.Show(ex.ToString()); } } }
public void UpdateValues(Offer offer) { Details.Clear(); foreach (var detail in offer.Details) { Details.Add(detail); } Features.Clear(); foreach (var feature in offer.Features) { Features.Add(feature); } Description = offer.Description; ImageThumbnails.Clear(); foreach (var thumb in offer.ImageThumbnails) { ImageThumbnails.Add(thumb); } Images.Clear(); foreach (var image in offer.Images) { Images.Add(image); } Location = offer.Location; IsFinished = offer.IsFinished; }
IProgress <AlgorithmState <TFactor, Point> > IAlgorithmObserverFactory <Point> .Create <TFactor>(HeuristicSearchBase <TFactor, Point> source) { var progress = new AlgorithmObserver <TFactor>(); Details.Clear(); progress.Callback = ProgressCallback; return(progress); }
public BrokerTransactionJson(BrokerTransaction brokerTransaction) { Id = brokerTransaction.Id; Rev = brokerTransaction.Rev; Symbol = brokerTransaction.Symbol; CreatedDate = brokerTransaction.CreatedDate; UpdatedDate = brokerTransaction.UpdatedDate; UpdatedBy = brokerTransaction.UpdatedBy; CreatedBy = brokerTransaction.CreatedBy; Details.Clear(); Details.AddRange(brokerTransaction.Details); }
public CountViewModel(int?id) { Items.Clear(); Details.Clear(); DetailList.Clear(); countServices = new CountServices(); syncServices = new SyncServices(); //if (id == null) // LoadItems(); //else // LoadDetailsPlan((int)id); User = "******"; }
/// <summary> /// Called when the connection has changed. /// </summary> /// <param name="reconnect">if set to <c>true</c> automatically reconnect.</param> /// <param name="updateTitle">if set to <c>true</c> set the application title.</param> public void OnConnectionChanged(bool reconnect = true, bool updateTitle = true) { CloseEtpClient(); Resources.Clear(); Messages.Clear(); Details.Clear(); // notify child view models Items.OfType <ISessionAware>() .ForEach(x => x.OnConnectionChanged(Model.Connection)); if (!string.IsNullOrWhiteSpace(Model.Connection.Uri) && reconnect) { InitEtpClient(); } if (updateTitle) { Runtime.Shell.SetApplicationTitle(this); } }
/// <summary> /// Called when the connection has changed. /// </summary> /// <param name="reconnect">if set to <c>true</c> automatically reconnect.</param> /// <param name="updateTitle">if set to <c>true</c> set the application title.</param> public async Task OnConnectionChanged(bool reconnect = true, bool updateTitle = true) { CloseEtpClient(); Resources.Clear(); Messages.Clear(); Details.Clear(); EtpExtender = null; // notify child view models foreach (var screen in _protocolTabs) { var tab = screen as ISessionAware; tab?.OnConnectionChanged(Model.Connection); Items.Remove(screen); if (tab == null) { continue; } if (tab.SupportedVersions == null || tab.SupportedVersions.ContainsIgnoreCase(Model.Connection.SubProtocol)) { Items.Add(tab); tab.Refresh(); } } Refresh(); if (!string.IsNullOrWhiteSpace(Model.Connection.Uri) && reconnect) { await InitEtpClient(); } if (updateTitle) { Runtime.Shell.SetApplicationTitle(this); } }
void DetailOfState() { using (var db = new ModelDB()) { string state = States[CurrentlySelectedState]; var Data = from p in db.ControlEquipmentState where p.IDState == state orderby p.Time select p; Details.Clear(); foreach (ControlEquipmentState p in Data) { Details.Add(new Detail { IDState = p.IDState, Time = $"{p.Time.Day}.{p.Time.Month}.{p.Time.Year} {p.Time.Hour}:{p.Time.Minute}:{p.Time.Second}", Flag = p.Flag }); } } }
public CountViewModel(int?id, string user) { Items.Clear(); Details.Clear(); DetailList.Clear(); countServices = new CountServices(); syncServices = new SyncServices(); if (id == null) { AsyncLoadItems(); //LoadItems(); } else { IdPlan = (int)id; AsyncLoadDetailsPlan(); } //LoadDetailsPlan((int)id); User = user; }
/// <summary>Clears the collection.</summary> public virtual void Clear() { Details.Clear(); }
public void Dispose() { Items.Clear(); Details.Clear(); DetailList.Clear(); }
protected void linkDelete_Click(object sender, EventArgs e) { Details.Clear(); BindDataControl(gvRequestParts, Details); }
private void Disponible_DoubleClick(object sender, EventArgs e) { Details.Clear(); Details.Text = Trabajadores[Disponible.SelectedIndices[0]].ToString(); }
/// <summary>Clears the collection.</summary> public void Clear() { Details.Clear(); }
private void BuildBookDetailsList(Book book) { Details.Clear(); #region Format var format = new List <string>(); if (!string.IsNullOrEmpty(book.Format)) { format.Add(book.Format); } if (!string.IsNullOrEmpty(book.NumPages)) { format.Add($"{book.NumPages} pages"); } if (format.Count > 0) { Details.Add(new Detail { Key = "Format", Value = string.Join(", ", format) }); } #endregion #region Published var published = new List <string>(); if (!string.IsNullOrEmpty(book.Publisher)) { published.Add(book.Publisher); } if (string.IsNullOrEmpty(book.PublicationYear)) { published.Add(book.PublicationYear); } if (published.Count > 0) { Details.Add(new Detail { Key = "Published", Value = string.Join(", ", published) }); } #endregion if (!string.IsNullOrEmpty(book.Work?.OriginalTitle)) { Details.Add(new Detail { Key = "Original Title", Value = book.Work.OriginalTitle }); } if (!string.IsNullOrEmpty(book.Isbn13)) { Details.Add(new Detail { Key = "ISBN13", Value = book.Isbn13 }); } if (book.SeriesWorks != null && book.SeriesWorks.Count > 0 && !string.IsNullOrEmpty(book.SeriesWorks?[0]?.Series?.Title)) { Details.Add(new Detail { Key = "Series", Value = book.SeriesWorks[0].Series.Title.Replace("\n", "").Trim(' ') }); } #region Stats var stats = new List <string>(); if (!string.IsNullOrEmpty(book.Work.RatingsCount)) { stats.Add($"{book.Work.RatingsCount} ratings"); } if (!string.IsNullOrEmpty(book.Work.TextReviewsCount)) { stats.Add($"{book.Work.TextReviewsCount} reviews"); } if (stats.Count > 0) { Stats = string.Join(", ", stats); } #endregion }