//************************************************************************** /// <Description> /// Get list of Location /// </Description> /// <Inputs> /// /// </Inputs> /// <Outputs> /// /// </Outputs> /// <Returns> /// /// </Returns> /// <Authors> /// THIENHD /// </Authors> /// <History> /// 15-Dec-2004 /// </History> /// <Notes> /// </Notes> //************************************************************************** public DataSet GetLocation() { try { DataSet dstLocation = new DataSet(); DataTable dt; DataRow drEmptyRow; //get Master Location MST_MasterLocationDS objMST_MasterLocationDS = new MST_MasterLocationDS(); dt = objMST_MasterLocationDS.List().Tables[0].Copy(); drEmptyRow = dt.NewRow(); dt.Rows.InsertAt(drEmptyRow, 0); dstLocation.Tables.Add(dt); //Get Location MST_LocationDS objMST_LocationDS = new MST_LocationDS(); dt = objMST_LocationDS.List().Tables[0].Copy(); drEmptyRow = dt.NewRow(); dt.Rows.InsertAt(drEmptyRow, 0); dstLocation.Tables.Add(dt); //Get Bin MST_BINDS objMST_BINDS = new MST_BINDS(); dt = objMST_BINDS.List().Tables[0].Copy(); drEmptyRow = dt.NewRow(); dt.Rows.InsertAt(drEmptyRow, 0); dstLocation.Tables.Add(dt); //Define relation for this dataset //1. Relation between Master Location and Location /* * DataColumn[] dtcolMasterLocationColumnParent = new DataColumn[1]{dstLocation.Tables[MST_MasterLocationTable.TABLE_NAME].Columns[MST_MasterLocationTable.MASTERLOCATIONID_FLD]}; * DataColumn[] dtcolLocationColumnChild = new DataColumn[1]{dstLocation.Tables[MST_LocationTable.TABLE_NAME].Columns[MST_LocationTable.MASTERLOCATIONID_FLD]}; * dstLocation.Relations.Add(dtcolMasterLocationColumnParent,dtcolLocationColumnChild); */ //2.Relation between Location and Bin /* * DataColumn[] dtcolLocationColumnParent = new DataColumn[1]{dstLocation.Tables[MST_LocationTable.TABLE_NAME].Columns[MST_LocationTable.LOCATIONID_FLD]}; * DataColumn[] dtcolBinColumnChild = new DataColumn[1]{dstLocation.Tables[MST_BINTable.TABLE_NAME].Columns[MST_BINTable.LOCATIONID_FLD]}; * dstLocation.Relations.Add(dtcolLocationColumnParent,dtcolBinColumnChild); */ return(dstLocation); } catch (PCSDBException ex) { throw ex; } catch (Exception ex) { throw ex; } }
public DataSet GetLocation() { DataSet dstLocation = new DataSet(); DataTable dt; //get Master Location MST_MasterLocationDS objMST_MasterLocationDS = new MST_MasterLocationDS(); dt = objMST_MasterLocationDS.List().Tables[0].Copy(); dstLocation.Tables.Add(dt); return(dstLocation); }
public DataSet List() { try { MST_MasterLocationDS dsMasterLocation = new MST_MasterLocationDS(); return(dsMasterLocation.List()); } catch (PCSDBException ex) { throw ex; } catch (Exception ex) { throw ex; } }