Example #1
0
        public string SaveUrl(RequestUrlModel requestParams)
        {
            var fileData = GetData();
            ResponseUrlModel response;

            if (fileData == null)
            {
                fileData = new ResponseUrlModel();
            }
            response = new ResponseUrlModel();
            switch (requestParams.Type)
            {
            case "organization":
                response = new ResponseUrlModel(requestParams.Values, fileData.premise, fileData.building, fileData.feedback);
                break;

            case "premise":
                response = new ResponseUrlModel(fileData.organization, requestParams.Values, fileData.building, fileData.feedback);
                break;

            case "building":
                response = new ResponseUrlModel(fileData.organization, fileData.premise, requestParams.Values, fileData.feedback);
                break;

            case "feedback":
                response = new ResponseUrlModel(fileData.organization, fileData.premise, fileData.building, requestParams.Values);
                break;
            }
            string json = JsonConvert.SerializeObject(response);

            File.WriteAllText(HttpContext.Current.Server.MapPath("~\\powerBI.json"), json);
            return("Power BI URL saved successfully");
        }
Example #2
0
 public ClientAuthorizer(ProtectedServerModel serverEntity,
                         ProtectedServerMemberClient requestClientInMember, RequestUrlModel requestUrlModel, IAESCrypter aesCrypter)
 {
     this.protectedServerEntity   = serverEntity;
     this.clientInProtectedMember = requestClientInMember;
     this.requestUrlModel         = requestUrlModel;
     this.aesCrypter = aesCrypter;
 }