public void SchemeUpdate(int SchemeID, int InsurerID, string Name, string Description)
{
Health_Scheme_System.Scheme updscheme = Scheme.Find(x => x.SchemeID == SchemeID).FirstOrDefault();
//updscheme.SchemeID = SchemeID;
//updscheme.InsurerID = InsurerID;
updscheme.Name = Name;
updscheme.Description = Description;
updscheme.Save();
}
Calling the method
//Converting to integer and date
int SchemeID;
int.TryParse(txtSchemeID.Text, out SchemeID);
int insurerID;
int.TryParse(txtInsurerID.Text, out insurerID);
//Getting the parameters from the method
DataAccess updscheme = new DataAccess();
//DataAccess updrates = new DataAccess();
updscheme.SchemeUpdate(SchemeID, insurerID, txtName.Text, txtDescription.Text);
//updrates.RatesUpdate(SchemeID, txtRates.Text);
//Binding the gridView to display the updates
txtSchemeID.Visible = false;
txtInsurerID.Visible = false;
gvSchemeMain.DataSource = ds.GetRates();
gvSchemeMain.DataBind();
我认为,这些问题与参数有关。