public string GetPartyLocationCode(int pintPartyLocationID) { try { MST_PartyLocationDS objMST_PartyLocationDS = new MST_PartyLocationDS(); return(objMST_PartyLocationDS.GetLocationCode(pintPartyLocationID)); } catch (PCSDBException ex) { throw ex; } catch (Exception ex) { throw ex; } }
//************************************************************************** /// <Description> /// This method uses to add data to MST_PartyLocation /// </Description> /// <Inputs> /// MST_PartyLocationVO /// </Inputs> /// <Outputs> /// newly inserted primarkey value /// </Outputs> /// <Returns> /// int /// </Returns> /// <Authors> /// DungLa /// </Authors> /// <History> /// 04-Mar-2005 /// </History> /// <Notes> /// </Notes> //************************************************************************** public int AddReturnID(object pObjectDetail) { try { MST_PartyLocationDS dsLocation = new MST_PartyLocationDS(); return(dsLocation.AddReturnID(pObjectDetail)); } catch (PCSException ex) { throw ex; } catch (Exception ex) { throw ex; } }
//************************************************************************** /// <Description> /// This method uses to update a dataset /// </Description> /// <Inputs> /// DataSet to update /// </Inputs> /// <Outputs> /// N/A /// </Outputs> /// <Returns> /// N/A /// </Returns> /// <Authors> /// DungLa /// </Authors> /// <History> /// 04-Mar-2005 /// </History> /// <Notes> /// </Notes> //************************************************************************** public void UpdateDataSet(System.Data.DataSet dstData) { try { MST_PartyLocationDS dsLocation = new MST_PartyLocationDS(); dsLocation.UpdateDataSet(dstData); } catch (PCSException ex) { throw ex; } catch (Exception ex) { throw ex; } }
//************************************************************************** /// <Description> /// This method uses to update MST_PartyLocationVO /// </Description> /// <Inputs> /// MST_PartyLocationVO /// </Inputs> /// <Outputs> /// N/A /// </Outputs> /// <Returns> /// N/A /// </Returns> /// <Authors> /// DungLa /// </Authors> /// <History> /// 04-Mar-2005 /// </History> /// <Notes> /// </Notes> //************************************************************************** public void Update(object pObjectDetail) { try { MST_PartyLocationDS dsLocation = new MST_PartyLocationDS(); dsLocation.Update(pObjectDetail); } catch (PCSException ex) { throw ex; } catch (Exception ex) { throw ex; } }
//************************************************************************** /// <Description> /// This method uses to get MST_PartyLocationVO by Code /// </Description> /// <Inputs> /// ID /// </Inputs> /// <Outputs> /// object /// </Outputs> /// <Returns> /// object /// </Returns> /// <Authors> /// DungLa /// </Authors> /// <History> /// 04-Mar-2005 /// </History> /// <Notes> /// </Notes> //************************************************************************** public object GetObjectVO(string pstrLocationCode) { try { MST_PartyLocationDS dsLocation = new MST_PartyLocationDS(); return(dsLocation.GetObjectVO(pstrLocationCode)); } catch (PCSException ex) { throw ex; } catch (Exception ex) { throw ex; } }
//************************************************************************** /// <Description> /// This method uses to get MST_PartyLocationVO /// </Description> /// <Inputs> /// ID /// </Inputs> /// <Outputs> /// object /// </Outputs> /// <Returns> /// object /// </Returns> /// <Authors> /// DungLa /// </Authors> /// <History> /// 04-Mar-2005 /// </History> /// <Notes> /// </Notes> //************************************************************************** public object GetObjectVO(int pintID, string VOclass) { try { MST_PartyLocationDS dsLocation = new MST_PartyLocationDS(); return(dsLocation.GetObjectVO(pintID)); } catch (PCSException ex) { throw ex; } catch (Exception ex) { throw ex; } }
//************************************************************************** /// <Description> /// list all location of specified Party /// </Description> /// <Inputs> /// PartyID /// </Inputs> /// <Outputs> /// /// </Outputs> /// <Returns> /// DataTable /// </Returns> /// <Authors> /// DungLA /// </Authors> /// <History> /// 04-Apr-2005 /// </History> /// <Notes> /// </Notes> //************************************************************************** public DataTable GetAllLocation(int pintPartyID) { try { MST_PartyLocationDS dsPartyLocation = new MST_PartyLocationDS(); return(dsPartyLocation.ListPartyLocation(pintPartyID).Tables[0]); } catch (PCSException ex) { throw ex; } catch (Exception ex) { throw ex; } }
public string GetBuyingLocName(int pintID) { try { MST_PartyLocationDS dsParty = new MST_PartyLocationDS(); return(((MST_PartyLocationVO)dsParty.GetObjectVO(pintID)).Code); } catch (PCSDBException ex) { throw ex; } catch (PCSException ex) { throw ex; } catch (Exception ex) { throw ex; } }
//************************************************************************** /// <Description> /// This method uses to delete MST_PartyLocation /// </Description> /// <Inputs> /// MST_PartyLocationVO /// </Inputs> /// <Outputs> /// N/A /// </Outputs> /// <Returns> /// N/A /// </Returns> /// <Authors> /// DungLa /// </Authors> /// <History> /// 04-Mar-2005 /// </History> /// <Notes> /// </Notes> //************************************************************************** public void Delete(object pObjectVO) { try { MST_PartyLocationVO voLocation = (MST_PartyLocationVO)pObjectVO; // delete all contact first MST_PartyContactDS dsContact = new MST_PartyContactDS(); dsContact.DeleteByLocation(voLocation.PartyLocationID); // finally delete Location MST_PartyLocationDS dsLocation = new MST_PartyLocationDS(); dsLocation.Delete(voLocation.PartyLocationID); } catch (PCSException ex) { throw ex; } catch (Exception ex) { throw ex; } }
//************************************************************************** /// <Description> /// This method uses to delete MST_Party /// </Description> /// <Inputs> /// MST_PartyVO /// </Inputs> /// <Outputs> /// N/A /// </Outputs> /// <Returns> /// N/A /// </Returns> /// <Authors> /// DungLa /// </Authors> /// <History> /// 04-Mar-2005 /// </History> /// <Notes> /// </Notes> //************************************************************************** public void Delete(object pObjectVO) { try { MST_PartyVO voParty = (MST_PartyVO)pObjectVO; // delete all contact first MST_PartyContactDS dsContact = new MST_PartyContactDS(); dsContact.DeleteByParty(voParty.PartyID); // then delete all location MST_PartyLocationDS dsLocation = new MST_PartyLocationDS(); dsLocation.DeleteByParty(voParty.PartyID); // finally delete Party MST_PartyDS dsParty = new MST_PartyDS(); dsParty.Delete(voParty.PartyID); } catch (PCSException ex) { throw ex; } catch (Exception ex) { throw ex; } }
//************************************************************************** /// <Description> /// Get list of Vendor Location /// </Description> /// <Inputs> /// /// </Inputs> /// <Outputs> /// /// </Outputs> /// <Returns> /// /// </Returns> /// <Authors> /// THIENHD /// </Authors> /// <History> /// 15-Dec-2004 /// </History> /// <Notes> /// </Notes> //************************************************************************** public DataTable GetVendorLocation() { // TODO: Add ProductItemInfoBO.GetVendorLocation implementation try { MST_PartyLocationDS objMST_PartyLocationDS = new MST_PartyLocationDS(); DataTable dt = objMST_PartyLocationDS.ListForCombo().Tables[0]; DataRow drEmptyRow = dt.NewRow(); dt.Rows.InsertAt(drEmptyRow, 0); return(dt); } catch (PCSDBException ex) { throw ex; } catch (Exception ex) { throw ex; } }
public DataTable GetPartyLocation() { MST_PartyLocationDS objMST_PartyLocationDS = new MST_PartyLocationDS(); return(objMST_PartyLocationDS.List().Tables[0]); }