FuelSDK.ET_DataExtensionRow.Patch C# (CSharp) Méthode

Patch() public méthode

public Patch ( ) : FuelSDK.PatchReturn
Résultat FuelSDK.PatchReturn
        public FuelSDK.PatchReturn Patch()
        {
            this.GetDataExtensionCustomerKey();
            ET_DataExtensionRow tempRow = this;
            tempRow.CustomerKey = this.DataExtensionCustomerKey;
            List<APIProperty> lProperties = new List<APIProperty>();
            foreach (KeyValuePair<string, string> kvp in this.ColumnValues)
            {
                APIProperty tempAPIProp = new APIProperty() { Name = kvp.Key, Value = kvp.Value };
                lProperties.Add(tempAPIProp);
            }
            tempRow.ColumnValues = null;
            tempRow.Properties = lProperties.ToArray();
            tempRow.DataExtensionName = null;
            tempRow.DataExtensionCustomerKey = null;
            return new FuelSDK.PatchReturn(tempRow);
        }

Usage Example

        public Response ActivateMeta(MetaSearchModel metaSearchModel)
        {
            var response = new Response { Success = true, Warning = false };
            try
            {
                var deRowPost = new ET_DataExtensionRow
                {
                    AuthStub = conexion.ETCliente,
                    DataExtensionName = "METASAPPBENEFICIOS",
                };

                deRowPost.ColumnValues.Add("ID", metaSearchModel.Id);
                deRowPost.ColumnValues.Add("ACTIVED", "TRUE");

                try
                {
                    var postResponse = deRowPost.Patch();
                    response.Success = postResponse.Status;
                    response.Message = postResponse.Message;
                    response.Code = postResponse.Code;
                }
                catch (Exception exCreate)
                {
                    response.Success = false;
                    response.Message = exCreate.Message;
                }
            }
            catch (Exception ex)
            {
                response.Success = false;
                response.Message = ex.Message;
            }

            return response;
        }
All Usage Examples Of FuelSDK.ET_DataExtensionRow::Patch