Example #1
0
        internal EditReasonNote(ProjectManagementWork work, string editType, string reason, bool needManagerAction = false)
        {
            //#if test
            //            MessageBox.Show("referenceInfo - " + EditReasonNote.ReferenceInfo.ToString());
            //            MessageBox.Show("Reference - " + Reference.ToString());
            //            MessageBox.Show("classObject - " + classObject.ToString());
            //#endif
            ReferenceObject newObject = Reference.CreateReferenceObject(classObject);// создание

            // Параметр "Тип редактирования"
            int editTypeCode = Array.IndexOf(TypeNames, editType);

            newObject[EditReasonNote.ERN_param_EditType_Guid].Value          = editTypeCode;
            newObject[EditReasonNote.ERN_param_Reason_Guid].Value            = reason;
            newObject[EditReasonNote.ERN_param_NeedActionManager_Guid].Value = needManagerAction;
            newObject.SetLinkedObject(EditReasonNote.ERN_link_ToPrjctMgmntN1_Guid, work.ReferenceObject);
            newObject.EndChanges();
            this.ReferenceObject = newObject;
        }