internal AuthConfigData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AuthPlatform platform, GlobalValidation globalValidation, IdentityProviders identityProviders, ContainerAppLogin login, HttpSettings httpSettings) : base(id, name, resourceType, systemData) { Platform = platform; GlobalValidation = globalValidation; IdentityProviders = identityProviders; Login = login; HttpSettings = httpSettings; }
/// Function Name : Delete Bid /// Parameter Details /// 1. BidDetail DTO /// /// Functionality /// This function accept Bid details DTO and delete the bid into DB based on Bid ID public HttpResponseMessage DeleteBid(BidDetail objBidDetail) { #region declaration DataTable dt = new DataTable(); string sQuery = ""; Random r = new Random(); DBOperation.StructDBOperation[] objParam = new DBOperation.StructDBOperation[2]; int iParamCount = 0; #endregion DBOperation.sConnectionString = ec.Decrypt(GlobalClass.sConnectionString); if (GlobalValidation.ShouldNotNull(objBidDetail.BidID)) { return(Request.CreateResponse(HttpStatusCode.ExpectationFailed, "Bid ID validation failed")); } objParam[iParamCount].sParamName = "@vQueryType"; objParam[iParamCount].sParamType = SqlDbType.VarChar; objParam[iParamCount].sParamValue = "DELETEBID"; iParamCount++; objParam[iParamCount].sParamName = "@bid"; objParam[iParamCount].sParamType = SqlDbType.VarChar; objParam[iParamCount].sParamValue = Convert.ToString(objBidDetail.BidID); iParamCount++; sQuery = ProcBidOperation_Bid; sRetVal = DBOperation.ExecuteDBOperation(sQuery, DBOperation.OperationType.STOREDPROC_UPDATE, objParam, ref dt); if (sRetVal == "SUCCESS") { return(Request.CreateResponse(HttpStatusCode.OK, "Bid Deleted Successfully")); } else { return(Request.CreateResponse(HttpStatusCode.ExpectationFailed, "Please Contact Administrator with below mentioned error " + sRetVal)); } }
internal static AuthConfigData DeserializeAuthConfigData(JsonElement element) { ResourceIdentifier id = default; string name = default; ResourceType type = default; SystemData systemData = default; Optional <AuthPlatform> platform = default; Optional <GlobalValidation> globalValidation = default; Optional <IdentityProviders> identityProviders = default; Optional <ContainerAppLogin> login = default; Optional <HttpSettings> httpSettings = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id")) { id = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("name")) { name = property.Value.GetString(); continue; } if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("systemData")) { systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString()); continue; } if (property.NameEquals("properties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("platform")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } platform = AuthPlatform.DeserializeAuthPlatform(property0.Value); continue; } if (property0.NameEquals("globalValidation")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } globalValidation = GlobalValidation.DeserializeGlobalValidation(property0.Value); continue; } if (property0.NameEquals("identityProviders")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } identityProviders = IdentityProviders.DeserializeIdentityProviders(property0.Value); continue; } if (property0.NameEquals("login")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } login = ContainerAppLogin.DeserializeContainerAppLogin(property0.Value); continue; } if (property0.NameEquals("httpSettings")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } httpSettings = HttpSettings.DeserializeHttpSettings(property0.Value); continue; } } continue; } } return(new AuthConfigData(id, name, type, systemData, platform.Value, globalValidation.Value, identityProviders.Value, login.Value, httpSettings.Value)); }