Example #1
0
 /// <summary>
 /// 加载时查询数据
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void FrmHistotyOrder_Load(object sender, EventArgs e)
 {
     SplashScreenHelper.ShowLoadingScreen();
     orderList = _orderDel.GetHistoricalOrders();
     skinDataGridView.DataSource = orderList;
     SplashScreenHelper.CloseForm();
 }
Example #2
0
        /// <summary>
        /// 处理分页
        /// </summary>
        private void GetSource()
        {
            SplashScreenHelper.ShowLoadingScreen();
            //获得当前页
            int cur = pagerControl.CurrentPage;
            //获得每页显示的记录数
            int rows       = pagerControl.RowsPerPage;
            int totalCount = 10;

            Goods = goodsDel.PageQuery(cur, rows, ref totalCount);
            pagerControl.RecordCount = totalCount;
            pagerControl.TotalPage   = totalCount / pagerControl.RowsPerPage + 1;
            try
            {
                product_grid.Rows.Clear();
                foreach (var item in Goods)
                {
                    Image image = Image.FromFile(@"Images\1.png");
                    product_grid.RowTemplate.Height = image.Height;
                    product_grid.Rows.Add(item.status == 0 ? true : false, image, item.weizhi,
                                          item.bianhao, item.codigo, item.namecn, item.baozhuangshu, item.zhuangxiangshu, item.maijia, item.kucun, item.beizhu);
                }
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
            }
            finally
            {
                SplashScreenHelper.CloseForm();
            }
        }