//************************************************************************** /// <Description> /// This method uses to get additional charge by PO Master /// </Description> /// <Inputs> /// int /// </Inputs> /// <Outputs> /// DataSet /// </Outputs> /// <Returns> /// DataSet /// </Returns> /// <Authors> /// DungLa /// </Authors> /// <History> /// 17-Feb-2005 /// </History> /// <Notes> /// </Notes> //************************************************************************** public DataSet GetAdditionalChargeByPOMasterID(int pintPOMasterID) { try { PO_AdditionChargesDS dsAddCharge = new PO_AdditionChargesDS(); MST_ReasonDS dsReason = new MST_ReasonDS(); DataSet dstData = dsAddCharge.GetAdditionalChargeByPOMasterID(pintPOMasterID); // fill reason code if have id foreach (DataRow drowData in dstData.Tables[0].Rows) { if ((drowData[PO_AdditionChargesTable.REASONID_FLD] != null) && (drowData[PO_AdditionChargesTable.REASONID_FLD].ToString() != string.Empty) && (drowData[PO_AdditionChargesTable.REASONID_FLD].ToString() != "0")) { string strReasonCode = dsReason.GetCodeFromID(int.Parse(drowData[SO_AdditionChargeTable.REASONID_FLD].ToString())); if ((strReasonCode != null) && (strReasonCode != string.Empty)) { drowData[MST_ReasonTable.TABLE_NAME + MST_ReasonTable.CODE_FLD] = strReasonCode; } } } return(dstData); } catch (PCSException ex) { throw ex; } catch (Exception ex) { throw ex; } }
//************************************************************************** /// <Description> /// This method uses to Update a DataSet /// </Description> /// <Inputs> /// DataSet /// </Inputs> /// <Outputs> /// /// </Outputs> /// <Returns> /// /// </Returns> /// <Authors> /// DungLa /// </Authors> /// <History> /// 07-Mar-2005 /// </History> /// <Notes> /// </Notes> //************************************************************************** public void UpdateDataSet(DataSet dstData) { try { PO_AdditionChargesDS dsPOAddCharge = new PO_AdditionChargesDS(); dsPOAddCharge.UpdateDataSet(dstData); } catch (PCSException ex) { throw ex; } catch (Exception ex) { throw ex; } }
//************************************************************************** /// <Description> /// This method uses to check a PO Master was charged or not /// </Description> /// <Inputs> /// Purchase Order Master ID (int) /// </Inputs> /// <Outputs> /// return true if charged /// else return false /// </Outputs> /// <Returns> /// bool /// </Returns> /// <Authors> /// DungLa /// </Authors> /// <History> /// 18-Feb-2005 /// </History> /// <Notes> /// </Notes> //************************************************************************** public bool AlreadyCharged(int pintPOMasterID) { try { PO_AdditionChargesDS dsAddCharge = new PO_AdditionChargesDS(); return(dsAddCharge.AlreadyCharged(pintPOMasterID)); } catch (PCSException ex) { throw ex; } catch (Exception ex) { throw ex; } }
//************************************************************************** /// <Description> /// This method uses to get data from PO detail by PO Master /// </Description> /// <Inputs> /// int /// </Inputs> /// <Outputs> /// DataSet /// </Outputs> /// <Returns> /// DataSet /// </Returns> /// <Authors> /// DungLa /// </Authors> /// <History> /// 17-Feb-2005 /// </History> /// <Notes> /// </Notes> //************************************************************************** public DataSet GetDataByPOMasterID(int pintPOMasterID) { try { PO_AdditionChargesDS dsAddCharge = new PO_AdditionChargesDS(); return(dsAddCharge.GetDataByPOMasterID(pintPOMasterID)); } catch (PCSException ex) { throw ex; } catch (Exception ex) { throw ex; } }
//************************************************************************** /// <Description> /// This method uses to check UM of all products /// </Description> /// <Inputs> /// Sale Order Master ID (int) /// </Inputs> /// <Outputs> /// return true if all of product have same UM /// else return false /// </Outputs> /// <Returns> /// bool /// </Returns> /// <Authors> /// DungLa /// </Authors> /// <History> /// 07-Mar-2005 /// </History> /// <Notes> /// </Notes> //************************************************************************** public bool IsChargeByQuantity(int pintSOMasterID) { try { PO_AdditionChargesDS dsAddCharge = new PO_AdditionChargesDS(); return(dsAddCharge.IsChargeByQuantity(pintSOMasterID)); } catch (PCSException ex) { throw ex; } catch (Exception ex) { throw ex; } }
//************************************************************************** /// <Description> /// This method uses to get all po detail by po master /// </Description> /// <Inputs> /// int /// </Inputs> /// <Outputs> /// DataTable /// </Outputs> /// <Returns> /// DataTable /// </Returns> /// <Authors> /// DungLa /// </Authors> /// <History> /// 17-Feb-2005 /// </History> /// <Notes> /// </Notes> //************************************************************************** public DataTable ListPODetailByPOMaster(int pintPOMasterID) { try { PO_AdditionChargesDS dsAddCharge = new PO_AdditionChargesDS(); return(dsAddCharge.GetPODetailByPOMaster(pintPOMasterID)); } catch (PCSException ex) { throw ex; } catch (Exception ex) { throw ex; } }
//************************************************************************** /// <Description> /// This method uses to get all POAdditionCharge by PO Master ID /// </Description> /// <Inputs> /// int /// </Inputs> /// <Outputs> /// DataSet /// </Outputs> /// <Returns> /// DataSet /// </Returns> /// <Authors> /// DungLa /// </Authors> /// <History> /// 07-Mar-2005 /// </History> /// <Notes> /// </Notes> //************************************************************************** public DataSet ListByPOMaster(int pintPOMasterID) { try { PO_AdditionChargesDS dsPOAddCharge = new PO_AdditionChargesDS(); return(dsPOAddCharge.List(pintPOMasterID)); } catch (PCSException ex) { throw ex; } catch (Exception ex) { throw ex; } }