예제 #1
0
        public override int GetHashCode()
        {
            int hashCode = 17; // we *know* we are using this in a dictionary, so pre-compute this

            hashCode = hashCode * 23 + Id.GetHashCode();
            hashCode = hashCode * 23 + (Fid == null ? 0 : Fid.GetHashCode());
            hashCode = hashCode * 23 + (EnableDate == null ? 0 : EnableDate.GetHashCode());
            hashCode = hashCode * 23 + (DisableDate == null ? 0 : DisableDate.GetHashCode());
            hashCode = hashCode * 23 + Dr.GetHashCode();
            hashCode = hashCode * 23 + Ts.GetHashCode();
            hashCode = hashCode * 23 + (CreateBy == null ? 0 : CreateBy.GetHashCode());
            hashCode = hashCode * 23 + (CreateDate == null ? 0 : CreateDate.GetHashCode());
            hashCode = hashCode * 23 + (CreateName == null ? 0 : CreateName.GetHashCode());
            hashCode = hashCode * 23 + (UpdateBy == null ? 0 : UpdateBy.GetHashCode());
            hashCode = hashCode * 23 + (UpdateDate == null ? 0 : UpdateDate.GetHashCode());
            hashCode = hashCode * 23 + (UpdateName == null ? 0 : UpdateName.GetHashCode());
            hashCode = hashCode * 23 + (TableName == null ? 0 : TableName.GetHashCode());
            hashCode = hashCode * 23 + (ColName == null ? 0 : ColName.GetHashCode());
            hashCode = hashCode * 23 + (ColComment == null ? 0 : ColComment.GetHashCode());
            hashCode = hashCode * 23 + (ColDefault == null ? 0 : ColDefault.GetHashCode());
            hashCode = hashCode * 23 + (ColType == null ? 0 : ColType.GetHashCode());
            hashCode = hashCode * 23 + ColProperty.GetHashCode();
            hashCode = hashCode * 23 + ColLength.GetHashCode();
            hashCode = hashCode * 23 + DisplayWidth.GetHashCode();
            hashCode = hashCode * 23 + ColOrder.GetHashCode();
            hashCode = hashCode * 23 + ColPrecision.GetHashCode();
            hashCode = hashCode * 23 + NullAble.GetHashCode();
            hashCode = hashCode * 23 + ShowAble.GetHashCode();
            hashCode = hashCode * 23 + IsDefaultCol.GetHashCode();
            hashCode = hashCode * 23 + (CtrlType == null ? 0 : CtrlType.GetHashCode());
            hashCode = hashCode * 23 + (RefTable == null ? 0 : RefTable.GetHashCode());
            hashCode = hashCode * 23 + (RefID == null ? 0 : RefID.GetHashCode());
            hashCode = hashCode * 23 + (RefCode == null ? 0 : RefCode.GetHashCode());
            hashCode = hashCode * 23 + (RefName == null ? 0 : RefName.GetHashCode());
            hashCode = hashCode * 23 + (RefCondition == null ? 0 : RefCondition.GetHashCode());
            hashCode = hashCode * 23 + (RefCols == null ? 0 : RefCols.GetHashCode());
            hashCode = hashCode * 23 + (RefType == null ? 0 : RefType.GetHashCode());
            hashCode = hashCode * 23 + (MainTable == null ? 0 : RefType.GetHashCode());
            hashCode = hashCode * 23 + (MainTableCol == null ? 0 : MainTableCol.GetHashCode());
            hashCode = hashCode * 23 + (CalculationExpr == null ? 0 : CalculationExpr.GetHashCode());
            return(hashCode);
        }
예제 #2
0
        public override string GenerateOutput(TagHelperOutput output, string content)
        {
            // col size
            if (ColSize.WithinRange())
            {
            }
            output.AppendCssClass(String.Format(ColumnSizeTemplate, ColSize, String.Empty));
            if (ColSizeDesktop.WithinRange())
            {
                output.AppendCssClass(String.Format(ColumnSizeTemplate, ColSizeDesktop, "-desktop"));
            }
            if (ColSizeTablet.WithinRange())
            {
                output.AppendCssClass(String.Format(ColumnSizeTemplate, ColSizeTablet, "-tablet"));
            }
            if (ColSizePhone.WithinRange())
            {
                output.AppendCssClass(String.Format(ColumnSizeTemplate, ColSizePhone, "-phone"));
            }

            // offset
            if (ColSizeOffset.WithinRange())
            {
                output.AppendCssClass(String.Format(ColumnOffsetTemplate, ColSizeOffset, String.Empty));
            }
            if (ColSizeOffsetDesktop.WithinRange())
            {
                output.AppendCssClass(String.Format(ColumnOffsetTemplate, ColSizeOffsetDesktop, "-desktop"));
            }
            if (ColSizeOffsetTablet.WithinRange())
            {
                output.AppendCssClass(String.Format(ColumnOffsetTemplate, ColSizeOffsetTablet, "-tablet"));
            }
            if (ColSizeOffsetPhone.WithinRange())
            {
                output.AppendCssClass(String.Format(ColumnOffsetTemplate, ColSizeOffsetPhone, "-phone"));
            }

            // order
            if (ColOrder.WithinRange())
            {
                output.AppendCssClass(String.Format(ColumnOrderTemplate, ColOrder, String.Empty));
            }
            if (ColOrderDesktop.WithinRange())
            {
                output.AppendCssClass(String.Format(ColumnOrderTemplate, ColOrderDesktop, "-desktop"));
            }
            if (ColOrderTablet.WithinRange())
            {
                output.AppendCssClass(String.Format(ColumnOrderTemplate, ColOrderTablet, "-tablet"));
            }
            if (ColOrderPhone.WithinRange())
            {
                output.AppendCssClass(String.Format(ColumnOrderTemplate, ColOrderPhone, "-phone"));
            }

            // hide
            if (ColHide)
            {
                output.AppendCssClass(String.Format(ColumnHideTemplate, String.Empty));
            }
            if (ColHideDesktop)
            {
                output.AppendCssClass(String.Format(ColumnHideTemplate, "-desktop"));
            }
            if (ColHideTablet)
            {
                output.AppendCssClass(String.Format(ColumnHideTemplate, "-tablet"));
            }
            if (ColHidePhone)
            {
                output.AppendCssClass(String.Format(ColumnHideTemplate, "-phone"));
            }

            if (Stretch)
            {
                output.AppendCssClass("mdl-cell--stretch");
            }

            if (AlignTop)
            {
                output.AppendCssClass("mdl-cell--top");
            }
            if (AlignMiddle)
            {
                output.AppendCssClass("mdl-cell--middle");
            }
            if (AlignBottom)
            {
                output.AppendCssClass("mdl-cell--bottom");
            }

            return(content);
        }