Beispiel #1
0
        private void SetupActiveListingDataGridViewColumns()
        {
            this.dataGridViewActiveListing.AutoGenerateColumns = false;
            this.dataGridViewActiveListing.AllowUserToAddRows  = false;

            // ItemID
            this.dataGridViewActiveListing.Columns.Add(
                DgvUtil.createDgvTextBoxColumn("ItemID", "ItemID", typeof(String), 10, false));

            // SellerName
            this.dataGridViewActiveListing.Columns.Add(
                DgvUtil.createDgvTextBoxColumn("SellerName", "卖家ID", typeof(String), 70, true));

            // GalleryURL
            this.dataGridViewActiveListing.Columns.Add(
                DgvUtil.createDgvImageColumn("Img", "图片", 60, true));

            // Title
            this.dataGridViewActiveListing.Columns.Add(
                DgvUtil.createDgvTextBoxColumn("Title", "物品名称", typeof(String), 320, true));

            // ListingType
            this.dataGridViewActiveListing.Columns.Add(
                DgvUtil.createDgvTextBoxColumn("ListingType", "上架类型", typeof(String), 80, true));

            // Quantity
            this.dataGridViewActiveListing.Columns.Add(
                DgvUtil.createDgvTextBoxColumn("Quantity", "总数", typeof(String), 40, true));

            // QuantityAvailable
            this.dataGridViewActiveListing.Columns.Add(
                DgvUtil.createDgvTextBoxColumn("QuantityAvailable", "剩余数", typeof(String), 70, true));

            // QuantityBid
            this.dataGridViewActiveListing.Columns.Add(
                DgvUtil.createDgvTextBoxColumn("BidCount", "竞拍数", typeof(String), 70, true));

            // StartPrice
            this.dataGridViewActiveListing.Columns.Add(
                DgvUtil.createDgvTextBoxColumn("StartPrice", "起始价", typeof(String), 70, true));

            // CurrentPrice
            this.dataGridViewActiveListing.Columns.Add(
                DgvUtil.createDgvTextBoxColumn("CurrentPrice", "当前价", typeof(String), 70, true));

            // TimeLeft
            this.dataGridViewActiveListing.Columns.Add(
                DgvUtil.createDgvTextBoxColumn("TimeLeft", "剩余时间", typeof(String), 100, true));

            // WatchCount
            this.dataGridViewActiveListing.Columns.Add(
                DgvUtil.createDgvTextBoxColumn("WatchCount", "关注度", typeof(String), 70, true));

            this.dataGridViewActiveListing.SelectionMode    = DataGridViewSelectionMode.FullRowSelect;
            this.dataGridViewActiveListing.MultiSelect      = true;
            this.dataGridViewActiveListing.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells;
        }
        //
        // Set up the datagridview columns manually, rather than letting them be generated
        // by columns defined in data source automatically.
        // Columns:
        //       0       - OrderId                     - invisible (for attaching the order id to a row)
        //       1       - OrderLineItemId             - invisible
        //       2       - Transaction id.
        //       3       - SellerName
        //       4       - BuyerId
        //       5       - BuyerCountry
        //       6       - ItemSKU
        //       7       - ItemTitle
        //       8       - ItemPrice
        //       9       - SaleQuantity
        //       10      - TotalPrice
        //       11      - SaleDate
        //       12      - IsSellerLeftFeedback
        //       13      - IsBuyerLeftFeedback
        //       14      - ShippingService
        //       15      - TrackingNo
        private void SetupOrderDataGridViewColumns()
        {
            this.dataGridViewAllOrders.AutoGenerateColumns = false;
            this.dataGridViewAllOrders.AllowUserToAddRows  = false;

            //
            this.dataGridViewAllOrders.Columns.Add(
                DgvUtil.createDgvImageColumn("", "", 20, true));

            // OrderId
            this.dataGridViewAllOrders.Columns.Add(
                DgvUtil.createDgvTextBoxColumn("OrderId", @"交易ID", typeof(string), 10, false));

            // OrderLineItemId
            this.dataGridViewAllOrders.Columns.Add(
                DgvUtil.createDgvTextBoxColumn("OrderLineItemId", @"orderLineItemIdID", typeof(string), 10, false));

            // Sale record id
            this.dataGridViewAllOrders.Columns.Add(
                DgvUtil.createDgvTextBoxColumn("TransactionId", @"#", typeof(string), 40, true));

            // SellerId
            this.dataGridViewAllOrders.Columns.Add(
                DgvUtil.createDgvTextBoxColumn("SellerName", @"卖家", typeof(string), 60, true));

            // BuyerId
            this.dataGridViewAllOrders.Columns.Add(
                DgvUtil.createDgvTextBoxColumn("BuyerId", @"买家", typeof(string), 80, true));

            // BuyerCountry
            this.dataGridViewAllOrders.Columns.Add(
                DgvUtil.createDgvTextBoxColumn("BuyerCountry", @"买家国家", typeof(string), 80, true));

            // ItemSKU
            this.dataGridViewAllOrders.Columns.Add(
                DgvUtil.createDgvTextBoxColumn("ItemSKU", @"SKU", typeof(string), 50, true));

            // ItemTitle
            this.dataGridViewAllOrders.Columns.Add(
                DgvUtil.createDgvTextBoxColumn("ItemTitle", @"物品名称", typeof(string), 320, true));

            // ItemPrice
            this.dataGridViewAllOrders.Columns.Add(
                DgvUtil.createDgvTextBoxColumn("ItemPrice", @"价格", typeof(double), 40, true));

            // SaleQuantity
            this.dataGridViewAllOrders.Columns.Add(
                DgvUtil.createDgvTextBoxColumn("SaleQuantity", @"数量", typeof(int), 40, true));

            // TotalPrice
            this.dataGridViewAllOrders.Columns.Add(
                DgvUtil.createDgvTextBoxColumn("TotalPrice", @"总价", typeof(double), 40, true));

            // SaleDate
            this.dataGridViewAllOrders.Columns.Add(
                DgvUtil.createDgvTextBoxColumn("SaleDateCN", @"售出时间", typeof(DateTime), 100, true));

            // IsSellerLeftFeedback
            this.dataGridViewAllOrders.Columns.Add(
                DgvUtil.createDgvCheckBoxColumn("IsSellerLeftFeedback", @"卖家评", typeof(String), 50, true));

            // IsBuyerLeftFeedback
            this.dataGridViewAllOrders.Columns.Add(
                DgvUtil.createDgvCheckBoxColumn("IsBuyerLeftFeedback", @"买家评", typeof(String), 50, true));

            // ShippingService
            this.dataGridViewAllOrders.Columns.Add(
                DgvUtil.createDgvTextBoxColumn("ShippingService", @"物流方式", typeof(string), 100, true));

            // ShippingTrackingNo
            this.dataGridViewAllOrders.Columns.Add(
                DgvUtil.createDgvTextBoxColumn("ShippingTrackingNo", @"跟踪号", typeof(string), 70, true));

            this.dataGridViewAllOrders.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
            this.dataGridViewAllOrders.MultiSelect   = true;
            this.dataGridViewAllOrders.RowPrePaint  += new DataGridViewRowPrePaintEventHandler(dgv_RowPrePaint);
        }