Example #1
0
        public MeasureWeight SaveInfo()
        {
            string  name          = txtName.Text;
            string  systemKeyword = txtSystemKeyword.Text;
            decimal ratio         = txtRatio.Value;
            int     displayOrder  = txtDisplayOrder.Value;

            MeasureWeight measureWeight = MeasureManager.GetMeasureWeightById(this.MeasureWeightId);

            if (measureWeight != null)
            {
                measureWeight = MeasureManager.UpdateMeasureWeight(measureWeight.MeasureWeightId,
                                                                   name, systemKeyword, ratio, displayOrder);
            }
            else
            {
                measureWeight = MeasureManager.InsertMeasureWeight(name,
                                                                   systemKeyword, ratio, displayOrder);
            }

            return(measureWeight);
        }