Error executing template "/Designs/SkanskaMaskin/Paragraph/_form_add_project_member.cshtml"
System.Exception: ProjectId not supplied
   at Softgear.SkanskaMaskin.Data.Business.ProjectManager.GetProjectOrganization(String projectId) in D:\a\1\s\Softgear.SkanskaMaskin.Data\Business\ProjectManager.cs:line 145
   at Softgear.SkanskaMaskin.Data.Business.ProjectManager.GetInternalUsersNotInProject(String projectCode) in D:\a\1\s\Softgear.SkanskaMaskin.Data\Business\ProjectManager.cs:line 0
   at CompiledRazorTemplates.Dynamic.RazorEngine_625391578f154219b8ffb7fef9f8bac0.Execute() in D:\wwwroot\rental.skanska.se\Files\Templates\Designs\SkanskaMaskin\Paragraph\_form_add_project_member.cshtml:line 9
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using Softgear.SkanskaMaskin.Data.Business 3 @using Dynamicweb.Security.UserManagement 4 @using System.Collections.Generic 5 @using System.Web; 6 @using System.Linq; 7 @{ 8 var projectCode = AccountManager.getActiveProjectCode(); 9 var internalUsers = ProjectManager.GetInternalUsersNotInProject(projectCode); 10 11 <form id="AddProjectMemberForm" name="AddProjectMemberForm" action="/dashboard/anvandare" method="post"> 12 <div class="FormGroup-section"> 13 <fieldset> 14 <legend class="FormGroup-heading">Lägg till användare</legend> 15 <div class="Grid-cell"> 16 <div class="Grid Grid--withGutter"> 17 18 <div class="Grid-cell u-sizeFull"> 19 <div id="Name_Div" class="Input Input--fill"> 20 <label for="addgroupmember">Välj användare</label> 21 <select id="addgroupmember-filter" name="addgroupmember" single> 22 <option value="" data-placeholder="true"></option> 23 @foreach (var user in internalUsers) 24 { 25 <option value="@user.AccessUserId" 26 firstname="@user.AccessUserFirstName" 27 lastname="@user.AccessUserLastName" 28 company="@user.AccessUserCompany" 29 email="@user.AccessUserEmail" 30 title="@user.AccessUserJobTitle" 31 phone="@user.AccessUserPhone"> 32 @user.AccessUserFirstName @user.AccessUserLastName 33 </option> 34 } 35 </select> 36 <p class="sg--form-error" id="add-member-form-error">Ingen användare är vald</p> 37 <input name="userid" type="hidden" id="UserId" value="" /> 38 </div> 39 </div> 40 41 <div class="Grid-cell u-sizeFull"> 42 <div id="Fullname_Div" class="Input Input--fill"> 43 <label for="fullname">Namn</label> 44 <input name="fullname" id="Fullname" type="text" value="" class="Input-field add-member-input js-formInputField" disabled /> 45 </div> 46 </div> 47 48 <div class="Grid-cell u-sizeFull"> 49 <div id="Company_Div" class="Input Input--fill"> 50 <label for="company">Företag</label> 51 <input name="company" id="Company" type="text" value="" class="Input-field add-member-input js-formInputField" disabled /> 52 </div> 53 </div> 54 55 <div class="Grid-cell u-sizeFull"> 56 <div id="Email_Div" class="Input Input--fill"> 57 <label for="email">E-Post</label> 58 <input name="email" id="Email" type="text" value="" class="Input-field add-member-input js-formInputField" disabled /> 59 </div> 60 </div> 61 62 <div class="Grid-cell u-sizeFull"> 63 <div id="Title_Div" class="Input Input--fill"> 64 <label for="title">Titel</label> 65 <input name="title" id="Title" type="text" value="" class="Input-field add-member-input js-formInputField" disabled /> 66 </div> 67 </div> 68 69 <div class="Grid-cell u-sizeFull"> 70 <div id="Phone_Div" class="Input Input--fill"> 71 <label for="phone">Mobilnummer</label> 72 <input name="phone" id="Phone" type="text" value="" class="Input-field add-member-input js-formInputField" disabled /> 73 </div> 74 </div> 75 <div class="Grid-cell u-size1of3"> 76 <div class="Input Input--fill Input--hasValue"> 77 <button type="submit" id="submitter" class="Button">Lägg till</button> <button type="button" id="reset" class="Button Button--tertiary">Rensa</button> 78 </div> 79 </div> 80 </div> 81 </div> 82 </fieldset> 83 </div> 84 </form> 85 }