示例#1
0
        void DisplayOrders(string section, string query, DateTime firstDate, DateTime lastDate)
        {
            profit = 0; dgvOrders.Rows.Clear();
            List <OrderModel> list  = new List <OrderModel>();
            List <OrderModel> list2 = new List <OrderModel>();

            if (section == "customer")
            {
                list = HelperOrder.GetOrderModelCusList(query);
            }
            else if (section == "product")
            {
                list = HelperOrder.GetOrderModelProList(query);
            }
            else if (section == "category")
            {
                list = HelperOrder.GetOrderModelCateList(query);
            }
            else
            {
                list = HelperOrder.GetOrderModelList();
            }

            foreach (var item in list)
            {
                if (Convert.ToDateTime(item.orderDate).Ticks >= firstDate.Ticks &&
                    Convert.ToDateTime(item.orderDate).Ticks <= lastDate.Ticks)
                {
                    list2.Add(item);
                }
            }

            SubDisplayOrders(list2);
        }
示例#2
0
        private void FormPayment_Load(object sender, EventArgs e)
        {
            var list = HelperOrder.GetOrderModelList(cusID, status);

            foreach (var item in list)
            {
                dgvOrder.Rows.Add(item.orderID, Convert.ToDateTime(item.orderDate).ToShortDateString(), item.orderStatus, item.amount);
            }
        }
示例#3
0
        void DisplayOrders(DateTime firstDate, DateTime lastDate)
        {
            profit = 0; dgvOrders.Rows.Clear();
            List <OrderModel> list  = new List <OrderModel>();
            List <OrderModel> list2 = new List <OrderModel>();

            list = HelperOrder.GetOrderModelList();
            foreach (var item in list)
            {
                if (Convert.ToDateTime(item.orderDate).Ticks >= firstDate.Ticks &&
                    Convert.ToDateTime(item.orderDate).Ticks <= lastDate.Ticks)
                {
                    list2.Add(item);
                }
            }

            SubDisplayOrders(list2);
        }
示例#4
0
 void DisplayOrders()
 {
     profit = 0; dgvOrders.Rows.Clear();
     SubDisplayOrders(HelperOrder.GetOrderModelList());
 }