Example #1
0
        private void reMain_ConnectChange(object sender, ucRelationEditor.UpdateConnectEventArgs e)
        {
            var columnInfo      = e.BeginPoint.Child as ColumnInfo;
            var oracleParameter = e.EndPoint.Child as OracleParameter;

            if (columnInfo != null && oracleParameter != null)
            {
                columnInfo.ParameterName = oracleParameter.ParameterName;
            }
        }
Example #2
0
        private void reMain_UpdateConnect(object sender, ucRelationEditor.UpdateConnectEventArgs e)
        {
            var field = (ModuleFieldInfo)e.EndPoint.Child;
            var param = (OracleParameter)e.BeginPoint.Child;

            if (field.ParameterName == param.ParameterName)
            {
                e.IsConnect      = true;
                e.ConnectorColor = e.BeginPoint.Color;
            }
        }
Example #3
0
        private void reMain_UpdateConnect(object sender, ucRelationEditor.UpdateConnectEventArgs e)
        {
            var columnInfo      = e.BeginPoint.Child as ColumnInfo;
            var oracleParameter = e.EndPoint.Child as OracleParameter;

            if (columnInfo != null && oracleParameter != null && oracleParameter.ParameterName == columnInfo.ParameterName)
            {
                e.IsConnect = true;
                if (columnInfo.ColumnType == ColumnType.FILTER || columnInfo.ColumnType == ColumnType.FILTERVAL)
                {
                    e.ConnectorColor = Color.Red;
                }
                else
                {
                    e.ConnectorColor = Color.Black;
                }
            }
        }
Example #4
0
        private void reMain_ConnectChange(object sender, ucRelationEditor.UpdateConnectEventArgs e)
        {
            var param = e.BeginPoint.Child as OracleParameter;
            var field = e.EndPoint.Child as ModuleFieldInfo;

            if (field != null && param != null && !string.IsNullOrEmpty(field.ParameterName))
            {
                string paramType;
                switch (field.FieldType)
                {
                case CODES.DEFMODFLD.FLDTYPE.STRING:
                    paramType = "VARCHAR2";
                    break;

                case CODES.DEFMODFLD.FLDTYPE.DATE:
                case CODES.DEFMODFLD.FLDTYPE.DATETIME:
                    paramType = "DATE";
                    break;

                default:
                    paramType = "NUMBER";
                    break;
                }

                if (param.ParameterType == OracleParameterType.NEW)
                {
                    foreach (PaintObject <string, OracleParameter> endPoints in reMain.EndPaintObjects)
                    {
                        if (endPoints.Childs.Contains(param))
                        {
                            var insertPosition = endPoints.Childs.Count - 1;
                            endPoints.Childs.Insert(insertPosition,
                                                    new OracleParameter
                            {
                                ParameterName    = field.ParameterName,
                                ParameterType    = OracleParameterType.IN,
                                ParamterDataType = paramType
                            });
                        }
                    }
                }
            }
        }