Exemplo n.º 1
0
        public override GridViewCostCellDetail GetCellDetail(MaintenanceCostLineItem costLine, string columnName)
        {
            GridViewCostCellDetail costCellDetail = null;

            switch (columnName)
            {
            case CostColumnContainer.CostColumn_ServiceAmount:
            {
                costCellDetail =
                    PurchaseCostManager.CreateDataCostCellDetail(costLine.ServiceAmount,
                                                                 GridViewColumnAccess.Edit,
                                                                 GridViewColumnType.EditBox,
                                                                 GridViewCellValueType.Decimal);

                if (costLine.ServiceAmount.HasValue)
                {
                    costCellDetail.DisplayValue = costLine.ServiceAmount.Value.ToString("0.00");
                }

                return(costCellDetail);
            }
            }

            return(base.GetCellDetail(costLine, columnName));
        }
Exemplo n.º 2
0
        public override GridViewCostCellDetail GetCellDetail(HRCostLineItem costLine, string columnName)
        {
            GridViewCostCellDetail costCellDetail = null;

            switch (columnName)
            {
            case CostColumnContainer.CostColumn_HRSettlement:
            {
                costCellDetail =
                    PurchaseCostManager.CreateDataCostCellDetail(costLine.SettlementMode,
                                                                 GridViewColumnAccess.Edit,
                                                                 GridViewColumnType.ComboBox,
                                                                 GridViewCellValueType.String);

                costCellDetail.DataSource = EntityConstants.HRSettlementModes;

                return(costCellDetail);
            }

            default:
            {
                break;
            }
            }

            return(base.GetCellDetail(costLine, columnName));
        }
Exemplo n.º 3
0
        public override GridViewCostCellDetail GetCellDetail(PurchaseCostLineItem costLine, string columnName)
        {
            GridViewCostCellDetail costCellDetail = null;

            switch (columnName)
            {
            case CostColumnContainer.CostColumn_ProdLifeORLeaseTerm:
            {
                costCellDetail =
                    PurchaseCostManager.CreateDataCostCellDetail(costLine.ProductionLifetime,
                                                                 GridViewColumnAccess.View,
                                                                 GridViewColumnType.EditBox,
                                                                 GridViewCellValueType.Integer);

                costCellDetail.DisplayValue = costLine.ProductionLifetime.ToString();

                return(costCellDetail);
            }

            default:
            {
                break;
            }
            }

            return(base.GetCellDetail(costLine, columnName));
        }
Exemplo n.º 4
0
        public override GridViewCostCellDetail GetCellDetail(LeaseCostLineItem costLine, string columnName)
        {
            GridViewCostCellDetail costCellDetail = null;

            switch (columnName)
            {
            case CostColumnContainer.CostColumn_LeaseRateFactor:
            {
                costCellDetail =
                    PurchaseCostManager.CreateDataCostCellDetail(costLine.LeaseRateFactor,
                                                                 GridViewColumnAccess.Edit,
                                                                 GridViewColumnType.EditBox,
                                                                 GridViewCellValueType.Percentage);

                costCellDetail.DisplayValue = LocalizationUtils.FormatRateToString(costLine.LeaseRateFactor, 6);

                return(costCellDetail);
            }

            case CostColumnContainer.CostColumn_CompliantLeaseOption:
            {
                costCellDetail =
                    PurchaseCostManager.CreateDataCostCellDetail(costLine.CompliantLeaseOption,
                                                                 GridViewColumnAccess.Edit,
                                                                 GridViewColumnType.ComboBox,
                                                                 GridViewCellValueType.String);

                costCellDetail.DataSource = EntityConstants.CompliantLeaseOptions;

                return(costCellDetail);
            }

            default:
            {
                break;
            }
            }

            return(base.GetCellDetail(costLine, columnName));
        }
Exemplo n.º 5
0
        public override GridViewCostCellDetail GetCellDetail(LaborCostLineItem costLine, string columnName)
        {
            GridViewCostCellDetail costCellDetail = null;

            switch (columnName)
            {
            case CostColumnContainer.CostColumn_JobType:
            {
                costCellDetail =
                    PurchaseCostManager.CreateDataCostCellDetail(costLine.JobTypeId,
                                                                 GridViewColumnAccess.Edit,
                                                                 GridViewColumnType.ComboBox,
                                                                 GridViewCellValueType.Integer);

                costCellDetail.DataSource = XpressTestingFakeData.JobTypeDataSource;

                return(costCellDetail);
            }
            }

            return(base.GetCellDetail(costLine, columnName));
        }
        public override GridViewCostCellDetail GetCellDetail(StandardServiceCostLineItem costLine, string columnName)
        {
            GridViewCostCellDetail costCellDetail = null;

            switch (columnName)
            {
            case CostColumnContainer.CostColumn_InvTreat:
            {
                costCellDetail =
                    PurchaseCostManager.CreateDataCostCellDetail(costLine.InvoicingTreatment,
                                                                 GridViewColumnAccess.Edit,
                                                                 GridViewColumnType.ComboBox,
                                                                 GridViewCellValueType.String);

                costCellDetail.DataSource = EntityConstants.InvoicingTreatments;

                return(costCellDetail);
            }
            }

            return(base.GetCellDetail(costLine, columnName));
        }