Esempio n. 1
0
        public static Acc_Voucher GetAllAcc_WorkFlowVoucher(string voucherKey)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            Acc_Voucher       voucher    = new Acc_Voucher();
            IDataReader       reader     = null;
            String            sql        = "select * from Acc_Voucher where VoucherKey='" + voucherKey + "'";

            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    Acc_Voucher newAcc_Voucher = new Acc_Voucher();
                    newAcc_Voucher.SetData(reader);
                    voucher = newAcc_Voucher;
                }
                return(voucher);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }
Esempio n. 2
0
        public static Acc_Voucher GetAllAcc_Voucher(string voucherNo)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            Acc_Voucher       voucher    = new Acc_Voucher();
            IDataReader       reader     = null;
            String            sql        = "select VoucherKey,VoucherTypeKey,FYKey,OrgKey,VoucherDate,VoucherNo,VoucherClient,PayRec,VoucherDesc,IsPost,PostDate,PostBy,EntryDate,EntryUserKey,LastUpdateDate,LastUpdateUserKey,NField_1,NField_2,TField_1,TField_2,TField_3,TField_4,TField_5,DField_1,DField_2,IField_1,BField_1,CheckNo,CheckDate from Acc_Voucher where VoucherNo='" + voucherNo + "'";

            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    Acc_Voucher newAcc_Voucher = new Acc_Voucher();
                    newAcc_Voucher.SetData(reader);
                    voucher = newAcc_Voucher;
                }
                return(voucher);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }
Esempio n. 3
0
        public static CustomList <Acc_Voucher> GetAllAcc_Voucher(Int32 VoucherTypeKey)
        {
            ConnectionManager        conManager            = new ConnectionManager(ConnectionName.HR);
            CustomList <Acc_Voucher> Acc_VoucherCollection = new CustomList <Acc_Voucher>();
            IDataReader reader = null;
            String      sql    = "spFindVoucher " + VoucherTypeKey;

            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    Acc_Voucher newAcc_Voucher = new Acc_Voucher();
                    newAcc_Voucher.SetData(reader);
                    Acc_VoucherCollection.Add(newAcc_Voucher);
                }
                return(Acc_VoucherCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }
Esempio n. 4
0
        public static CustomList <Acc_Voucher> GetAllAcc_Voucher()
        {
            ConnectionManager        conManager            = new ConnectionManager(ConnectionName.HR);
            CustomList <Acc_Voucher> Acc_VoucherCollection = new CustomList <Acc_Voucher>();
            IDataReader  reader = null;
            const String sql    = "select VoucherKey,VoucherTypeKey,FYKey,OrgKey,VoucherDate,VoucherNo,VoucherClient,PayRec,VoucherDesc,IsPost,PostDate,PostBy,EntryDate,EntryUserKey,LastUpdateDate,LastUpdateUserKey,NField_1,NField_2,TField_1,TField_2,TField_3,TField_4,TField_5,DField_1,DField_2,IField_1,BField_1,CheckNo,CheckDate from Acc_Voucher Where IsPost=0 Order By VoucherDate Desc";

            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    Acc_Voucher newAcc_Voucher = new Acc_Voucher();
                    newAcc_Voucher.SetData(reader);
                    Acc_VoucherCollection.Add(newAcc_Voucher);
                }
                Acc_VoucherCollection.InsertSpName = "spInsertAcc_Voucher";
                Acc_VoucherCollection.UpdateSpName = "spUpdateAcc_Voucher";
                Acc_VoucherCollection.DeleteSpName = "spDeleteAcc_Voucher";
                return(Acc_VoucherCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }
Esempio n. 5
0
 public static Acc_Voucher GetAllAcc_WorkFlowVoucher(string voucherKey)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     Acc_Voucher voucher = new Acc_Voucher();
     IDataReader reader = null;
     String sql = "select * from Acc_Voucher where VoucherKey='" + voucherKey + "'";
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             Acc_Voucher newAcc_Voucher = new Acc_Voucher();
             newAcc_Voucher.SetData(reader);
             voucher = newAcc_Voucher;
         }
         return voucher;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
Esempio n. 6
0
 public static Acc_Voucher GetAllAcc_Voucher(string voucherNo)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     Acc_Voucher voucher = new Acc_Voucher();
     IDataReader reader = null;
     String sql = "select VoucherKey,VoucherTypeKey,FYKey,OrgKey,VoucherDate,VoucherNo,VoucherClient,PayRec,VoucherDesc,IsPost,PostDate,PostBy,EntryDate,EntryUserKey,LastUpdateDate,LastUpdateUserKey,NField_1,NField_2,TField_1,TField_2,TField_3,TField_4,TField_5,DField_1,DField_2,IField_1,BField_1,CheckNo,CheckDate from Acc_Voucher where VoucherNo='" + voucherNo + "'";
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             Acc_Voucher newAcc_Voucher = new Acc_Voucher();
             newAcc_Voucher.SetData(reader);
             voucher = newAcc_Voucher;
         }
         return voucher;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
Esempio n. 7
0
 public static CustomList<Acc_Voucher> GetAllAcc_Voucher(Int32 VoucherTypeKey)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<Acc_Voucher> Acc_VoucherCollection = new CustomList<Acc_Voucher>();
     IDataReader reader = null;
     String sql = "spFindVoucher "+VoucherTypeKey;
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             Acc_Voucher newAcc_Voucher = new Acc_Voucher();
             newAcc_Voucher.SetData(reader);
             Acc_VoucherCollection.Add(newAcc_Voucher);
         }
         return Acc_VoucherCollection;
     }
     catch(Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }