Пример #1
0
        public MeasureDimension SaveInfo()
        {
            string  name          = txtName.Text;
            string  systemKeyword = txtSystemKeyword.Text;
            decimal ratio         = txtRatio.Value;
            int     displayOrder  = txtDisplayOrder.Value;

            MeasureDimension measureDimension = MeasureManager.GetMeasureDimensionById(this.MeasureDimensionId);

            if (measureDimension != null)
            {
                measureDimension = MeasureManager.UpdateMeasureDimension(measureDimension.MeasureDimensionId,
                                                                         name, systemKeyword, ratio, displayOrder);
            }
            else
            {
                measureDimension = MeasureManager.InsertMeasureDimension(name,
                                                                         systemKeyword, ratio, displayOrder);
            }

            return(measureDimension);
        }