.net 需要修复未找到签名错误MAUI DotNet

qrjkbowd  于 2023-01-06  发布在  .NET
关注(0)|答案(1)|浏览(128)

我试图实现一个程序,需要显示数据时,我在茂宜岛的日期选择器中更改日期。但它给出了一个签名未找到错误。无法找到它的解决方案。有人能帮忙吗?代码如下。

<DatePicker Grid.Row="3" x:Name="mDatePicker" Style="{StaticResource dateStyle}" MinimumDate="01/01/2020" MaximumDate="12/31/2022" Date="01/01/2022" TextColor="White" DateSelected="Datepicker_SelectedIndexChanged" />

    private void Datepicker_SelectedIndexChanged(object sender, EventArgs e)
    {
     DatePickAync();
    }

    public async void DatePickAync()
    {
    
        var client = new RestClient();
        _dateToken = new DateToken();

        _dateToken.EmpKy = 874258;

        _dateToken.CompanyId = 156;

        _dateToken.FDT = new DateTime(2022 - 01 - 10);
    
        _dateToken.TDT = new DateTime(2022 - 01 - 31);

        _dateToken.Chk = 0;

        _dateToken.PrjKy = 1;

        _dateToken.TaskKy = 1;

        var request = new RestRequest("https://bl360x.com/BLEComTest/api/HR/MultiAtnAnlysis").AddJsonBody(_dateToken);

        request.Method = Method.Post;

        request.AddHeader("Accept", "application/json");

        request.AddHeader("IntegrationID", "1aa6a39b-5f54-4905-880a-a52733fd6105");

        request.AddHeader("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6WyJWaWhhbi5CTCIsIlZpaGFuLkJMIl0sIm5hbWVpZCI6IlZpaGFuLkJMIiwiRmlyc3ROYW1lIjoiVmloYW4uQkwiLCJVc2VySWQiOiJWaWhhbi5CTCIsIkVtYWlsIjoiTm8gRW1haWwiLCJDQ0QiOiJEQyIsInJvbGUiOiJDb21wYW55QXV0aFN1Y2Nlc3MiLCJuYmYiOjE2NzI4OTA1NTUsImV4cCI6MTY3MjkzMzc1NSwiaWF0IjoxNjcyODkwNTU1fQ.dFO70i68Yx7XtglN96vgCPG3-fGNhbrvB_CH3FWQ8XA");

        request.AddHeader("Content-Type", "application/json");

        RestResponse response = await client.PostAsync(request);

        // Check the status code of the response

        if (response.StatusCode == HttpStatusCode.OK)
        {
        // Read the response data
        var responseContent = response.Content.ToString();

        Console.WriteLine(responseContent);

      }
     else
      {
            Console.WriteLine("Request failed with status code: " + response.StatusCode);
        }
     }
ecr0jaav

ecr0jaav1#

DateSelected事件处理程序的签名应为

void Datepicker_SelectedIndexChanged(object sender, DateChangedEventArgs e)

相关问题