Exemplo n.º 1
0
 public MyOrder ToMyOrder(OrderDTO o)
 {
     return(new MyOrder
     {
         ID = o.MainOrderID,
         FullName = _orderManager.GetUsersFullNameById(o.CustomerID),
         Status = _orderManager.GetStatusName(o.StatusID),
         Date = o.Date,
         LastStaffUpdated = _orderManager.GetUsersFullNameById(o.LastStaffUpdated == null ? 0 : o.LastStaffUpdated.Value),
         LastUpdate = o.LastUpdate,
         Comments = o.Comments
     });
 }
Exemplo n.º 2
0
        private void FindOrdersByUser_Click(object sender, EventArgs e)
        {
            FindOrdersView.Items.Clear();
            var list = _ordersManager.FindOrdersByUser(_ordersManager.GetUserIdByUsername(textBox_byUsers.Text));

            foreach (var i in list)
            {
                string[] row = { i.MainOrderID.ToString(),
                                 _ordersManager.GetUsersFullNameById(i.CustomerID),
                                 i.Date.ToString(),
                                 _ordersManager.GetStatusName(i.StatusID),
                                 i.LastUpdate.ToString(),
                                 _ordersManager.GetUsersFullNameById(i.LastStaffUpdated != null ? i.LastStaffUpdated.Value : 0),
                                 i.Comments };
                var      listViewItem = new ListViewItem(row);
                FindOrdersView.Items.Add(listViewItem);
            }
        }