Ejemplo n.º 1
0
 public object GetObjectSaleOrderMaster(string psrtCode)
 {
     try
     {
         SO_SaleOrderMasterDS dsSaleOrderMasterDS = new SO_SaleOrderMasterDS();
         return(dsSaleOrderMasterDS.GetObjectVO(psrtCode));
     }
     catch (PCSDBException ex)
     {
         throw ex;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// SearchDupleSO
        /// </summary>
        /// <param name="pdtmDate"></param>
        /// <param name="pintPartyID"></param>
        /// <returns></returns>
        /// <author>Trada</author>
        /// <date>Friday, Feb 17 2006</date>

        public DataTable SearchDupleSO(DateTime pdtmDate, int pintPartyID)
        {
            DataSet dstDupleSO = new DataSet();
            SO_SaleOrderMasterDS dsSaleOrderMaster = new SO_SaleOrderMasterDS();

            dstDupleSO         = dsSaleOrderMaster.GetDupleSODelivery(pdtmDate, pintPartyID);
            dtbDupleSOToReturn = dstDupleSO.Tables[0].Clone();
            for (int i = 0; i < dstDupleSO.Tables[0].Rows.Count; i++)
            {
                for (int j = i + 1; j < dstDupleSO.Tables[0].Rows.Count; j++)
                {
                    if (TwoRowsAreTheSame(dstDupleSO.Tables[0].Rows[i], dstDupleSO.Tables[0].Rows[j]))
                    {
                        DataRow drowFirstNewRow = dtbDupleSOToReturn.NewRow();
                        if (!RowIsExist(dstDupleSO.Tables[0].Rows[i]))
                        {
                            //add the first column into dtbDupleSOToReturn
                            foreach (DataColumn dcol in  dtbDupleSOToReturn.Columns)
                            {
                                drowFirstNewRow[dcol.Caption] = dstDupleSO.Tables[0].Rows[i][dcol.Caption];
                            }
                            dtbDupleSOToReturn.Rows.Add(drowFirstNewRow);
                        }
                        DataRow drowSecondNewRow = dtbDupleSOToReturn.NewRow();
                        if (!RowIsExist(dstDupleSO.Tables[0].Rows[j]))
                        {
                            //add the first column into dtbDupleSOToReturn
                            foreach (DataColumn dcol in  dtbDupleSOToReturn.Columns)
                            {
                                drowSecondNewRow[dcol.Caption] = dstDupleSO.Tables[0].Rows[j][dcol.Caption];
                            }
                            dtbDupleSOToReturn.Rows.Add(drowSecondNewRow);
                            //dtbDupleSOToReturn.Rows.Add(dstDupleSO.Tables[0].Rows[j]);
                        }
                    }
                }
            }
            return(dtbDupleSOToReturn);
        }