Exemplo n.º 1
0
        public LocalRow Convert(DataRow _dataRow, LocalRow _localeRow)
        {
            SupplyTypeList supplyTypeList = new SupplyTypeList();
            ConvertData    convertData    = new ConvertData(_dataRow, _localeRow);

            _localeRow.ID           = convertData.ConvertDataInt32("ID");
            _localeRow.Status       = convertData.ConvertDataInt32("Status");
            _localeRow.StatusString = supplyTypeList.innerList.FirstOrDefault(x => x.ID == _localeRow.Status) != null?
                                      supplyTypeList.innerList.FirstOrDefault(x => x.ID == _localeRow.Status).Description : Properties.Resources.UndefindField;

            _localeRow.CreatedDate                 = convertData.ConvertDataDateTime("CreatedDate");
            _localeRow.CreatedDateString           = convertData.DateTimeConvertShortString(_localeRow.CreatedDate);
            _localeRow.LastModificatedDate         = convertData.ConvertDataDateTime("LastModificatedDate");
            _localeRow.LastModificatedDateString   = convertData.DateTimeConvertShortString(_localeRow.LastModificatedDate);
            _localeRow.CreatedUserID               = convertData.ConvertDataInt32("CreatedUserID");
            _localeRow.LastModificatedUserID       = convertData.ConvertDataInt32("LastModificatedUserID");
            _localeRow.CreatedUserIDString         = convertData.ConvertDataString("CreatedUserIDString");
            _localeRow.LastModificatedUserIDString = convertData.ConvertDataString("LastModificatedUserIDString");
            _localeRow.Invoice     = convertData.ConvertDataString("Invoice");
            _localeRow.TTN         = convertData.ConvertDataString("TTN");
            _localeRow.ManagerName = convertData.ConvertDataString("ManagerName");
            _localeRow.Delivery    = convertData.ConvertDataString("Delivery");
            _localeRow.Amount      = (Decimal)convertData.ConvertDataDouble("Amount");
            _localeRow.Count       = convertData.ConvertDataInt32("Count");

            return(_localeRow);
        }
Exemplo n.º 2
0
        public SupplyDocumentGrid()
        {
            InitializeComponent();

            FilterIDManagerName        = new DataTable();
            FilterIDDelivery           = new DataTable();
            FilterIDStatus             = new DataTable();
            FilterLastModifiedByUserID = new DataTable();

            FilterIDManagerName.Columns.Add("ID");
            FilterIDManagerName.Columns.Add("IsChecked");
            FilterIDManagerName.Columns.Add("Description");

            FilterIDDelivery.Columns.Add("ID");
            FilterIDDelivery.Columns.Add("IsChecked");
            FilterIDDelivery.Columns.Add("Description");

            FilterIDStatus.Columns.Add("ID");
            FilterIDStatus.Columns.Add("IsChecked");
            FilterIDStatus.Columns.Add("Description");

            FilterLastModifiedByUserID.Columns.Add("ID");
            FilterLastModifiedByUserID.Columns.Add("IsChecked");
            FilterLastModifiedByUserID.Columns.Add("Description");

            convertData = new ConvertData();

            supplyDocumentLogic = new SupplyDocumentLogic();
            localFilter         = new LocalFilter();
            localRow            = new LocalRow();

            datalist = new ObservableCollection <LocalRow>();

            summary = new RowSummary();

            this.SypplyDocument.ItemsSource = datalist;

            // supplyDocumentLogic.InitFilters();
            // InitFilters();
            Refresh();
            IsAllowFilter = true;
        }