Exemple #1
0
        public ShipmentListForm()
        {
            InitializeComponent();

            form                                  = this;
            Load                                 += ShipmentListLoad;
            btnView.Click                        += (sender, args) => LoadGrid();
            ShipmentView.RowCellStyle            += ChangeColor;
            ShipmentView.CustomColumnDisplayText += NumberGrid;
            btnExcel.Click                       += (sender, args) =>
            {
                var p = FilterVoid();

                var shipments = new ShipmentDataManager().ShipmentListExport(p);
                GridExport.DataSource = shipments;
                ExportExcel(GridExport);
            };

            GridShipment.DoubleClick += (o, args) =>
            {
                var rows = ShipmentView.GetSelectedRows();

                if (rows.Count() > 0)
                {
                    BaseControl.OpenRelatedForm(new TrackingViewForm(), ShipmentView.GetRowCellValue(rows[0], "Code").ToString(), CallingCommand);
                }
            };

            Shown += ShipmentListShow;
        }