Ejemplo n.º 1
0
        public static NGNumber GetNumber(PbBaseControlInfo pbCtl)
        {
            PbBaseTextInfo pbDec = new PbBaseTextInfo();

            if (pbCtl.ControlType == PbControlType.DecimalText)
            {
                pbDec = (PbDecimalTextInfo)pbCtl;
            }
            if (pbCtl.ControlType == PbControlType.IntText)
            {
                pbDec = (PbIntTextInfo)pbCtl;
            }

            NGNumber ngNum = new NGNumber();

            ngNum.ID               = pbDec.Id;
            ngNum.Name             = pbDec.Name;
            ngNum.MustInput        = pbDec.IsMustInput;
            ngNum.FieldLabel       = pbDec.LeftText;
            ngNum.DecimalPrecision = pbDec.ColumnInfo.Precision;
            ngNum.XType            = "ngNumber";
            ngNum.Visible          = pbDec.Visible;
            ngNum.MustInput        = pbDec.IsMustInput;
            ngNum.Protect          = pbDec.IsProtect;
            ngNum.FieldStyle       = GetRgb(pbDec.TextColor);
            ngNum.LabelStyle       = GetRgb(pbDec.LabelTextColor);
            return(ngNum);
        }
Ejemplo n.º 2
0
        public static ExtControlInfoBase GetNumberCtl(string fieldtype, int length, int declen, bool showPercent)
        {
            ExtControlInfoBase ctl = null;


            if ("06" == fieldtype)
            {
                ctl = new NGNumber(fieldtype, length, declen, showPercent);
            }
            else
            {
                ctl = new NGInt(fieldtype);
            }

            return(ctl);
        }