Untitled
unknown
plain_text
a year ago
1.5 kB
8
Indexable
//from products.cs
public string Imagess { get; set; }
public async Task<string> GetStudentsKey(string _id)
{
var evaluateID = (await client
.Child("students")
.OnceAsync<students>()).FirstOrDefault
(a => a.Object.ID == _id);
if (evaluateID != null)
{
studkey = evaluateID.Key;
ID = evaluateID.Object.ID;
fname = evaluateID.Object.FirstName;
lname = evaluateID.Object.LastName;
gender = evaluateID.Object.Gender;
address = evaluateID.Object.Address;
contactnumber = evaluateID.Object.ContactNumber;
images = evaluateID.Object.Imagess;
return evaluateID.Key;
}
return null;
}
//editpage.cs
private async void btnupdate_Clicked(object sender, EventArgs e)
{
var imag = images;
await _students.EditStudent(txtid.Text, txtfname.Text, txtlname.Text,
txtgender.Text, txtaddress.Text, txtcontactnumber.Text, imag);
await DisplayAlert("Update Successfully", "", "Ok!!");
Application.Current!.MainPage = new AppShell();
}
// mainpage.cs
private async void itemedititstudent_Invoked(object sender, EventArgs e)
{
var item = sender as SwipeItemView;
if (item == null) return;
if (item.BindingContext is students details)
{
studkey = await _Students.GetStudentsKey(details.ID);
//await DisplayAlert("", images, "Ok");
await Navigation.PushAsync(new EditStudent());
}
}
Editor is loading...
Leave a Comment