コード例 #1
0
        public DataSet GetFreeTableColumns(int docTypeID, string curColumn)
        {
            var fieldData = new FieldDALC(connectionString);

            return(GetData("SELECT " + nameField + ", " + typeField +
                           " FROM " + tableName + " WHERE (" +
                           colorderField + " > " +
                           "( SELECT " +
                           colorderField +
                           " FROM " + tableName +
                           " WHERE " + nameField + " = '" + editedField + "'" +
                           "))" +
                           " AND " +
                           "((" +
                           nameField + " NOT IN " +
                           "( SELECT " +
                           fieldData.TableColumnField +
                           " FROM " + fieldData.TableName +
                           " WHERE " + fieldData.DocTypeIDField + " = @DocTypeID" +
                           ")) OR (" +
                           nameField + " = @CurColumn))",
                           delegate(SqlCommand cmd)
            {
                AddParam(cmd, "@DocTypeID", SqlDbType.Int, docTypeID);
                AddParam(cmd, "@CurColumn", SqlDbType.NVarChar, curColumn);
            }));
        }
コード例 #2
0
        public DocTypeLinksDALC(string connectionString) : base(connectionString)
        {
            tableName = "ƒокументы.dbo.—в¤зи“иповƒокументов";

            var docTypeData = new DocTypeDALC(connectionString);

            docTypeTableName = docTypeData.TableName;
            docTypeIDField   = docTypeData.IDField;
            nameField        = docTypeData.NameField;

            var fieldData = new FieldDALC(connectionString);

            docFieldTable     = fieldData.TableName;
            docFieldNameField = fieldData.NameField;
            if (Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName.Equals("ru"))
            {
                nameLangField         = docTypeData.NameField + " + ' ' + " + docTypeData.AddNameField;
                docFieldNameLangField = fieldData.NameField;
            }
            else
            {
                nameLangField         = docTypeData.TypeDocField + " + ' ' + " + docTypeData.AddNameEngField;
                docFieldNameLangField = fieldData.FieldNameEngField;
            }
        }
コード例 #3
0
        public DocLinksDALC(string connectionString)
            : base(connectionString)
        {
            tableName = "vwСвязиДокументов";

            idField   = "КодСвязиДокументов";
            nameField = "";
            FieldDALC    fieldData;
            EmployeeDALC empData;
            MessageDALC  messData;
            DocTypeDALC  typesData;

            fieldData  = new FieldDALC(connectionString);
            fieldTable = fieldData.TableName;

            subFieldField      = fieldData.NameField;
            subFieldOrderField = fieldData.PositionField;

            var docData = new DocumentDALC(connectionString);

            docTable                 = docData.TableName;
            documentIDField          = docData.IDField;
            documentNameField        = docData.NameField;
            documentDateField        = docData.DateField;
            documentDescriptionField = docData.DescriptionField;
            spDocRights              = docData.SpDocRights;

            inWorkField = docData.InWorkField;

            messData      = new MessageDALC(connectionString);
            spSendMessage = messData.SpSendMessage;

            empData    = new EmployeeDALC(connectionString);
            empIDField = empData.IDField;
            empField   = Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName.Equals("ru") ? empData.NameField : empData.EmloyeeField;
            empTable   = empData.TableName;

            typesData         = new DocTypeDALC(connectionString);
            typesTable        = typesData.TableName;
            typesIDField      = typesData.IDField;
            typesNameField    = typesData.NameField;
            typesNameEngField = typesData.TypeDocField;
        }