clsImportProject Class |
Use MPInterface.bImportProject(clsImportProject, clsImportBaseeImportMode) to import.
Namespace: MARIInterface
The clsImportProject type exposes the following members.
| Name | Description | |
|---|---|---|
| clsImportProject | Initializes a new instance of the clsImportProject class |
| Name | Description | |
|---|---|---|
| ActiveType | Set the active type of the project. See clsImportProjecteProjektActiveType. | |
| AssessmentMode |
0=no attendance, 1=attendance on the valuation from unready operations V2.2
| |
| BookableUntilPeriod |
period for posting block (YYYYMMM)
| |
| BusinessUnit |
INT Business Unit identifier. Mandatory link indirectly for the profitcenter/costcenter. See dimension clsImportSetupBusinessUnits for details.
| |
| CostObjektive | Obsolete.
Property will be replaces by ProjectCodeFinance. Logical link to the finance project code.
| |
| CustomerCode1 |
Customer reference of the project. 1 = Main customer
| |
| CustomerCode2 |
Customer reference of project. 2=second customer
| |
| DegreeOfCompleation |
0 to 0.99 as Integer 1 = 100% is as the same time with completionist (automatic in class)
| |
| EndDate |
planned enddate fom the project
| |
| Group1 |
Link to MPProjektGruppen WHERE GruppenArt=1 ProjectGroup1 | |
| Group10 |
Link to MPProjektGruppen WHERE GruppenArt=10 ProjectGroup10 | |
| Group2 |
Link to MPProjektGruppen WHERE GruppenArt=10000 ProjectGroup2 | |
| Group3 |
Link to MPProjektGruppen WHERE GruppenArt=10003 ProjectGroup3 | |
| Group4 |
Link to MPProjektGruppen WHERE GruppenArt=3 ProjectGroup4 | |
| Group5 |
Link to MPProjektGruppen WHERE GruppenArt=2 ProjectGroup5 | |
| Group6 |
Link to MPProjektGruppen WHERE GruppenArt=6 ProjectGroup6 | |
| Group7 |
Link to MPProjektGruppen WHERE GruppenArt=7 ProjectGroup7 | |
| Group8 |
Link to MPProjektGruppen WHERE GruppenArt=8 ProjectGroup8 | |
| Group9 |
Link to MPProjektGruppen WHERE GruppenArt=9 ProjectGroup9 | |
| GroupAssigment | Obsolete.
not used
| |
| Matchcode |
NVARCHAR(50) search and order name of the project. This field is mostly used for internal users. The field ProjectName is used to be viewed by the customer.
| |
| OcrCode1 | OcrCode1. Can be set on project level, when company setting modified to use profit center from project master | |
| OcrCode2 | OcrCode2. Can be set on project level, when company setting modified to use profit center from project master | |
| OcrCode3 | OcrCode3. Can be set on project level, when company setting modified to use profit center from project master | |
| OcrCode4 | OcrCode4. Can be set on project level, when company setting modified to use profit center from project master | |
| OcrCode5 | OcrCode5. Can be set on project level, when company setting modified to use profit center from project master | |
| OrderProbarbility |
Declaration form the Order Probability in percent 0.5 = 50%. Use only 0.1, 0.2, 0.3 ... (as this is only supported in the FrontEnd)
| |
| PlanningCalendar |
ID form the calendar for the planning. The planning calendar is used to calculate from a planning demand x days and the resource quantity y the plan dates. The calendar defines the working days and hours. If empty, the planning calendar from the basic settings (by project business unit) is used.
| |
| PlanningMethod |
Default 0=Fixed planning versions, 1=special delta planning mechanism, 2: project linked to MSProject(or Primavera)
| |
| PlanningVersion | This fields stores the current planning Version.
| |
| ProjectAbsenseType |
Only used for ProjectType=VacationProjects. See eProjectAbsenseType for details.
| |
| ProjectCodeFinance | SAP Business One Projectcode (OPRJ.PrjCode) will be created by basic settings defintion:
When the interface is creating the project code, make sure, that SAP Business One DI-API is installed in 32 or 64 bit version, where MARIInterfase is running or that MARIInterface can reach Service Layer Service | |
| ProjectManager1 |
NVARCHAR(20)EmployeeID of the first project manager
| |
| ProjectManager2 |
NVARCHAR(50)EmployeeID of the second project manager
| |
| ProjectMemo |
references to the project
| |
| ProjectName |
NVARCHAR(50) official name of the project (visible to the customer). See also Matchcode for the internal name of the project.
| |
| ProjectNumber |
NVARCHAR(20), Primarys Key: Project identifier "P12345". The format and length is defined in the setting.
You can use the function sGetNewProjectNumber(Int32) to generate a new project number based on the busienss unit | |
| ProjectStatus |
last actual status, status table only as history. clsImportProjecteProjectStatus.
| |
| ProjectType |
Type of project. See eProjectType for details.
| |
| ReferencePhase |
Link to a phase in the Internal Preliminary Project
| |
| StartDate |
Startdate form the project
| |
| WorkGroupFilter |
Manages who can use the project for booking: 0 = not filter, all employees can book hours; 1= filter employees on workgroup
|
| Name | Description | |
|---|---|---|
| bReadFromDB |
Reads the project data from the database and copies the values to the class
Only for internal use! To load data use your own SQL.
(Overrides clsImportBasebReadFromDB(MPInterface, String).) | |
| bSaveRSToMDB | (Overrides clsImportBasebSaveRSToMDB(MPInterface, DataRow, DataTable).) | |
| GetListUserDefinedFields |
Returns the user defined field definition for the dimension "Project Master". The fields have to be defined directly in MARIProject.
(Overrides clsImportBaseGetListUserDefinedFields(MPInterface).) |
| Name | Description | |
|---|---|---|
| ProjectTemplate |
Template Projectnumber
| |
| ProjectTemplateSetting |
Flagg of eProjectTemplateSettings
for example
1 = Phases
3 = Phases + ProjectTeams
7 = Phases + ProjectTeams + Folder
8 = Project Manager
|
private bool CreateNewProject(string sNewProjectNumber, string sProjectName) { Log($"CreateNewProject(\"{sNewProjectNumber}\",\"{sProjectName}\")"); try { clsImportProject oProject = new clsImportProject(); /* * For example the interface can create a new project number by business unit * sNewProjectNumber = oMPInterface.sGetNewProjectNumber(nBusinessUnit); */ oProject.ProjectNumber = sNewProjectNumber; oProject.ProjectName = sProjectName; oProject.Matchcode = oProject.ProjectName; oProject.BusinessUnit = 1; // SELECT BusinessUnitID FROM MARIBusinessUnitMaster. oProject.ProjectType = clsImportProject.eProjectType.CustomerProjects; oProject.ActiveType = clsImportProject.eProjektActiveType.OpenForBoocking; oProject.ProjectStatus = clsImportProject.eProjectStatus.ProjectRunning; oProject.CustomerCode1 = "10006"; // Main Customer linked to the project (CompanyID from Project Business unit) oProject.PlanningVersion = 3; // Start with the current planning //Project Code can be created automatically with the project, depending on the settings. SBO DI-API or ServiceLevel will be used. oProject.ProjectCodeFinance = ""; oProject.ProjectManager1 = "0001"; // employee code for the project manager SELECT EmployeeNumber FROM MARIEmployeeMaster if (oMPInterface.bImportProject(oProject, clsImportBase.eImportMode.ValidateAndImport)) { return true; } LogFail(oMPInterface.oErrors.PrintErrors(true)); return false; } catch (Exception ex) { Log(ex); return false; } }