public UAReturn LoadDataFrame(ServerDataSource dataSource, string dframename) //13Feb2014
{
string commstr = string.Empty;
UAReturn result = new UAReturn() { Success = false };
result.CommandString = RCommandStrings.LoadDataframe(dataSource, dframename);
commstr = result.CommandString;
result = this.Evaluate(commstr);
if (result.Data != null)
{
UAReturn result2 = RefreshNewDataset(dataSource);//26Mar2013 to avoid code redundancy.(code here was separated out to a function)
result.Datasource = result2.Datasource;
result.Success = result2.Success;
result.Error = result2.Error;
result.CommandString = commstr;//21Oct2013
}
return result;
}