Click or drag to resize

clsImportQualityProcessQuestion Class

Import for table MPQualityProcessQuestions: QualityProcess Definition Questionnaire. Import first clsImportQualityProcess.

MS Access table MARIProjektImportQualityProcessQuestions. See clsImportBase.eImportMode relative tables in MS-Access.

Use MPInterface.bImportQualityProcessQuestion(clsImportQualityProcessQuestion, clsImportBaseeImportMode) to import.

Inheritance Hierarchy
SystemObject
  MARIInterfaceclsImportBase
    MARIInterfaceclsImportQualityProcessQuestion

Namespace:  MARIInterface
Assembly:  MARIInterface (in MARIInterface.dll) Version: 8.0.0.100
Syntax
public class clsImportQualityProcessQuestion : clsImportBase

The clsImportQualityProcessQuestion type exposes the following members.

Constructors
  NameDescription
Public methodclsImportQualityProcessQuestion
Initializes a new instance of the clsImportQualityProcessQuestion class
Top
Methods
Fields
  NameDescription
Public fieldAnswerLength
AnswerLength. Only applies for text types
Public fieldAnswerType
AnswerType: Value type for the result. 1=Bool,4=Int32,5=Currency/Float,8=Date,10=VARCHAR. See eAnswerType for details.
Public fieldDependencyID
DependencyID Makes a new question dependend on another question.
Public fieldDependencyType
Diside the visibility of a question based on the eDependencyType.
Public fieldDestinationField
DestinationField User Defined field in the customer service object table to store the result in this field. USER_Field1
Public fieldHandlingOfLimits
Handling of the limits ValueRangeFrom and ValueRangeTo. See eLimitHandling.
Public fieldQualityProcess
Link to the quality process or check list. See clsImportQualityProcess
Public fieldQualityProcessQuestion
Internal ID for the question. Will be created replaced during the import with the number in MARIProject.
Public fieldQuestionInstructions1
This text will be shown, when the object is tested for the first time (initial test)
Public fieldQuestionInstructions2
This text (hint) is shown, then the object is tested a second time.
Public fieldQuestionModeApprovalFirst
QuestionMode: Show the question on the initial test approval
Public fieldQuestionModeApprovalRepeat
QuestionMode: Show the question after the initial approval
Public fieldQuestionModeQuestionFirst
QuestionMode: Show the question on a initial test
Public fieldQuestionModeQuestionRepeat
QuestionMode: Show the question after the initial test
Public fieldQuestionOrder
QuestionOrder. Will be handled automatically. New questions will be added at the end.
Public fieldQuestionPictureArrayOfBytes
The picture can be transfered via a byte array instead of a QuestionPictureFileName.
Public fieldQuestionPictureFileName
Linking a file name, will load this file into the database. The file content has to be accessable from the import process.

The picture content is stored in: View: MARIPictures : : Table: MPBilder

Public fieldQuestionPictureID
A picture or drawing can ilustrate information for the selected question. See also clsImportQualityProcess.PictureID to link a picture or drawing to the check list.
Public fieldQuestionText
The question text.
Public fieldQuestionVisible
Questions can be hided, when not used any more. A question cannot be deleted, because historic results may be linked.
Public fieldRetestOption
Defines the visibility of the question, when the object is tested again. eRetestOption for details.
Public fieldUnit
Unit of measurnment: kW, kmh mi/h...
Public fieldValueListMemo
ValueListMemo: For ComboBoxes use a colon seperated list with two columns; First the value, second the visible: A;ValueA;B;ValueB
Public fieldValueRangeFrom
Allowed value the results can be used. Only for eAnswerType integer or currency
Public fieldValueRangeTo
Allowed value the results can be used. Only for eAnswerType integer or currency
Public fieldViewFieldName
Name for the field to be used in the automaticly created view for Reports on results.
Public fieldVisibilityOfLimits
Visibility of the limits ValueRangeFrom and ValueRangeTo. See eLimitVisibility.
Top
Remarks
Examples
Create a new question to a checklist
private void CreateQuestion(int lCheckList, string sQuestionText, clsImportQualityProcessQuestion.eAnswerType AnswerType) {
    clsImportQualityProcessQuestion NewQuestion = new clsImportQualityProcessQuestion();
    NewQuestion.QualityProcess = lCheckList;
    NewQuestion.QuestionText = sQuestionText;
    NewQuestion.AnswerType = AnswerType;
    NewQuestion.QuestionModeQuestionFirst = true;
    NewQuestion.QuestionModeQuestionRepeat = true;
    NewQuestion.QuestionModeApprovalFirst = false;
    NewQuestion.QuestionModeApprovalRepeat = false;
    NewQuestion.QuestionVisible = true;
    NewQuestion.Unit = "mm";

    if (!oMPInterface.bImportQualityProcessQuestion(NewQuestion, MARIInterface.clsImportBase.eImportMode.ValidateAndImport)) {
        //NewEquipmentCategory.oErrors contains all Errors
        Assert.False(true, oMPInterface.oErrors.PrintErrors());
    } else {
        string sMessage = "New Quality Process Question. Unique key = " + NewQuestion.QualityProcessQuestion.ToString();
    }
}
Create Questions and Checklist for qualification tasks
int lChecklist, lQuestion1, lQuestion2, lQualificationPlan;

private void CreateQualificationCheckListAndQuestions(string CheckListName) {
    lChecklist = CreateQualificationCheckList(CheckListName);
    lQuestion1 = CreateChecklistQuestion(lChecklist, "Quality of training (school grades)", clsImportQualityProcessQuestion.eAnswerType.AnswerTypeInteger32Bit);
    lQuestion2 = CreateChecklistQuestion(lChecklist, "Quality of facility (school grades)", clsImportQualityProcessQuestion.eAnswerType.AnswerTypeInteger32Bit);
}

private int CreateQualificationCheckList(string CheckListName) {
    clsImportQualityProcess NewCheckList = new clsImportQualityProcess();
    NewCheckList.QualityProcessType = clsImportQualityProcess.eQualityProcessType.EmployeeQualification;
    NewCheckList.Matchcode = CheckListName;

    if (oMPInterface.bImportQualityProcess(NewCheckList, clsImportBase.eImportMode.ValidateAndImport)) {
        return NewCheckList.QualityProcess;
    } else {
        string sErrordetails;
        sErrordetails = oMPInterface.oErrors.PrintErrors(true);
        Assert.False(true, sErrordetails);
        return 0;
    }
}

private int CreateChecklistQuestion(int lQualityProcess, string sQuestion, clsImportQualityProcessQuestion.eAnswerType nAnswerType) {
    clsImportQualityProcessQuestion NewQuestion = new clsImportQualityProcessQuestion();
    NewQuestion.QualityProcess = lQualityProcess;
    NewQuestion.QuestionText = sQuestion;
    NewQuestion.QuestionModeQuestionFirst = true;
    NewQuestion.QuestionVisible = true;
    NewQuestion.AnswerType = nAnswerType;

    if (oMPInterface.bImportQualityProcessQuestion(NewQuestion, clsImportBase.eImportMode.ValidateAndImport)) {
        return NewQuestion.QualityProcessQuestion;
    } else {
        string sErrordetails;
        sErrordetails = oMPInterface.oErrors.PrintErrors(true);
        Assert.False(true, sErrordetails);
        return 0;
    }
}

View: MARIQualityProcessQuestions: :Table: MPQualityProcessQuestions

See Also