protected virtual void btnDelete_Click(object sender, DirectEventArgs e)
        {
            string error = string.Empty;

            try
            {
                ChangeRecords <TModel> changes = GetChangedRecords(e);
                Presenter.SaveModel(null, null, changes.Deleted);
            }
            catch (Exception ex)
            {
                error = ex.Message;
            }
            ResMgr.AddScript(error == string.Empty ? "DeleteSuccess();" : "DeleteFailure();");
        }
        protected virtual void btnSave_Click(object sender, DirectEventArgs e)
        {
            string error = string.Empty;

            try
            {
                ChangeRecords <TModel> changes = GetChangedRecords(e);
                Presenter.SaveModel(changes.Created, changes.Updated, changes.Deleted);
            }
            catch (Exception ex) //change to crud ex
            {
                error = ex.Message;
            }

            ResMgr.AddScript(error == string.Empty ? "SaveSuccess();" : string.Format("SaveFailure('{0}');", error));
        }