예제 #1
0
파일: Server.cs 프로젝트: baffled/bookstore
 /// <summary>
 /// getAuthorsAsTable ; get a data table of the author keys and names
 /// </summary>
 /// <remarks>
 /// This uses the UniXML utility class to return an enquiry command as a data table
 /// for easy data binding.
 /// </remarks>
 /// <param name="authors"></param>
 /// <returns></returns>
 public Boolean getAuthorsAsTable(ref DataTable authors)
 {
     try {
         lock (_syncCall) {
             UniXML ux  = _sess.CreateUniXML();
             String cmd = BookConst.SEL_AUTHORS_QUERY;
             ux.GenerateXML(cmd);
             DataSet ds = ux.GetDataSet();
             authors = ds.Tables[0];
         }
     } catch (Exception ex) {
         ShowError(ex.Message);
         return(false);
     }
     return(true);
 }