public static CustomList <Acc_VoucherDet> GetAllAcc_VoucherDetBS(Int32 orgKey, string fromDate, string toDate, Int32 fYKey) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); CustomList <Acc_VoucherDet> Acc_VoucherDetCollection = new CustomList <Acc_VoucherDet>(); IDataReader reader = null; String sql = "Exec Acc_Rpt_BS " + fYKey + "," + orgKey + ",'" + fromDate + "','" + toDate + "'"; try { conManager.OpenDataReader(sql, out reader); while (reader.Read()) { Acc_VoucherDet newAcc_VoucherDet = new Acc_VoucherDet(); newAcc_VoucherDet.SetDataBS(reader); Acc_VoucherDetCollection.Add(newAcc_VoucherDet); } return(Acc_VoucherDetCollection); } catch (Exception ex) { throw (ex); } finally { if (reader != null && !reader.IsClosed) { reader.Close(); } } }
public static CustomList <Acc_VoucherDet> GetReceiptHeadList(Int64 empKey) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); CustomList <Acc_VoucherDet> Acc_VoucherDetCollection = new CustomList <Acc_VoucherDet>(); IDataReader reader = null; String sql = "Exec spGetReceiptHeadList " + empKey; try { conManager.OpenDataReader(sql, out reader); while (reader.Read()) { Acc_VoucherDet newAcc_VoucherDet = new Acc_VoucherDet(); newAcc_VoucherDet._COAKey = reader.GetInt64("COAKey"); newAcc_VoucherDet._COAName = reader.GetString("COAName"); Acc_VoucherDetCollection.Add(newAcc_VoucherDet); } return(Acc_VoucherDetCollection); } catch (Exception ex) { throw (ex); } finally { if (reader != null && !reader.IsClosed) { reader.Close(); } } }
public static Acc_VoucherDet CheckToDelete(Int64 COAKey) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); //CustomList<Acc_VoucherDet> Acc_VoucherDetCollection = new CustomList<Acc_VoucherDet>(); IDataReader reader = null; String sql = "select Top 1 * from Acc_VoucherDet Where COAKey=" + COAKey; try { conManager.OpenDataReader(sql, out reader); Acc_VoucherDet newAcc_VoucherDet = new Acc_VoucherDet(); while (reader.Read()) { newAcc_VoucherDet.SetData(reader); } return(newAcc_VoucherDet); } catch (Exception ex) { throw (ex); } finally { if (reader != null && !reader.IsClosed) { reader.Close(); } } }
public static CustomList <Acc_VoucherDet> CheckBankAndCashVoucher(string searchStr) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); CustomList <Acc_VoucherDet> Acc_VoucherDetCollection = new CustomList <Acc_VoucherDet>(); IDataReader reader = null; String sql = "EXEC spCheckCashAndBank " + searchStr; try { conManager.OpenDataReader(sql, out reader); while (reader.Read()) { Acc_VoucherDet newAcc_VoucherDet = new Acc_VoucherDet(); newAcc_VoucherDet._VoucherNo = reader.GetString("VoucherNo"); newAcc_VoucherDet._Cr = reader.GetDecimal("Cr"); newAcc_VoucherDet._Bal = reader.GetDecimal("Bal"); Acc_VoucherDetCollection.Add(newAcc_VoucherDet); } return(Acc_VoucherDetCollection); } catch (Exception ex) { throw (ex); } finally { if (reader != null && !reader.IsClosed) { reader.Close(); } } }
public static CustomList <Acc_VoucherDet> GetAllAcc_VoucherDet(Int64 voucherKey) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); CustomList <Acc_VoucherDet> Acc_VoucherDetCollection = new CustomList <Acc_VoucherDet>(); IDataReader reader = null; String sql = "select VoucherDetKey,UserKey,ContactID,VoucherKey,COAKey,Convert(Decimal(18,2),Dr)Dr,Convert(Decimal(18,2),Cr)Cr,EntryDate,EntryUserKey,LastUpdateDate,LastUpdateUserKey,Criteria from Acc_VoucherDet Where VoucherKey=" + voucherKey; try { conManager.OpenDataReader(sql, out reader); while (reader.Read()) { Acc_VoucherDet newAcc_VoucherDet = new Acc_VoucherDet(); newAcc_VoucherDet.SetData(reader); Acc_VoucherDetCollection.Add(newAcc_VoucherDet); } Acc_VoucherDetCollection.InsertSpName = "spInsertAcc_VoucherDet"; Acc_VoucherDetCollection.UpdateSpName = "spUpdateAcc_VoucherDet"; Acc_VoucherDetCollection.DeleteSpName = "spDeleteAcc_VoucherDet"; return(Acc_VoucherDetCollection); } catch (Exception ex) { throw (ex); } finally { if (reader != null && !reader.IsClosed) { reader.Close(); } } }
public static CustomList <Acc_VoucherDet> GetAllAcc_VoucherDet() { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); CustomList <Acc_VoucherDet> Acc_VoucherDetCollection = new CustomList <Acc_VoucherDet>(); IDataReader reader = null; const String sql = "select *from Acc_VoucherDet"; try { conManager.OpenDataReader(sql, out reader); while (reader.Read()) { Acc_VoucherDet newAcc_VoucherDet = new Acc_VoucherDet(); newAcc_VoucherDet.SetData(reader); Acc_VoucherDetCollection.Add(newAcc_VoucherDet); } Acc_VoucherDetCollection.InsertSpName = "spInsertAcc_VoucherDet"; Acc_VoucherDetCollection.UpdateSpName = "spUpdateAcc_VoucherDet"; Acc_VoucherDetCollection.DeleteSpName = "spDeleteAcc_VoucherDet"; return(Acc_VoucherDetCollection); } catch (Exception ex) { throw (ex); } finally { if (reader != null && !reader.IsClosed) { reader.Close(); } } }
public static CustomList <Acc_VoucherDet> GetAllAcc_VoucherDet(Int64 voucherKey, string fromDate) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); CustomList <Acc_VoucherDet> Acc_VoucherDetCollection = new CustomList <Acc_VoucherDet>(); IDataReader reader = null; String sql = "EXEC spGetVoucherDet " + voucherKey + ",'" + fromDate + "'"; try { conManager.OpenDataReader(sql, out reader); while (reader.Read()) { Acc_VoucherDet newAcc_VoucherDet = new Acc_VoucherDet(); newAcc_VoucherDet.SetData(reader); newAcc_VoucherDet._Bal = reader.GetDecimal("Bal"); //newAcc_VoucherDet._Flag = reader.GetString("Flag"); Acc_VoucherDetCollection.Add(newAcc_VoucherDet); } Acc_VoucherDetCollection.InsertSpName = "spInsertAcc_VoucherDet"; Acc_VoucherDetCollection.UpdateSpName = "spUpdateAcc_VoucherDet"; Acc_VoucherDetCollection.DeleteSpName = "spDeleteAcc_VoucherDet"; return(Acc_VoucherDetCollection); } catch (Exception ex) { throw (ex); } finally { if (reader != null && !reader.IsClosed) { reader.Close(); } } }
public static CustomList<Acc_VoucherDet> GetAllAcc_VoucherDetTB(Int32 orgKey, string fromDate, string toDate) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); CustomList<Acc_VoucherDet> Acc_VoucherDetCollection = new CustomList<Acc_VoucherDet>(); IDataReader reader = null; String sql = "Exec Acc_Rpt_TB " + orgKey + ",'" + fromDate + "','" + toDate + "'"; try { conManager.OpenDataReader(sql, out reader); while (reader.Read()) { Acc_VoucherDet newAcc_VoucherDet = new Acc_VoucherDet(); newAcc_VoucherDet.SetDataTB(reader); Acc_VoucherDetCollection.Add(newAcc_VoucherDet); } return Acc_VoucherDetCollection; } catch (Exception ex) { throw (ex); } finally { if (reader != null && !reader.IsClosed) reader.Close(); } }
public static CustomList<Acc_VoucherDet> GetAllAcc_VoucherDet(Int64 voucherKey, string fromDate) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); CustomList<Acc_VoucherDet> Acc_VoucherDetCollection = new CustomList<Acc_VoucherDet>(); IDataReader reader = null; String sql = "EXEC spGetVoucherDet " + voucherKey + ",'" + fromDate + "'"; try { conManager.OpenDataReader(sql, out reader); while (reader.Read()) { Acc_VoucherDet newAcc_VoucherDet = new Acc_VoucherDet(); newAcc_VoucherDet.SetData(reader); newAcc_VoucherDet._Bal = reader.GetDecimal("Bal"); //newAcc_VoucherDet._Flag = reader.GetString("Flag"); Acc_VoucherDetCollection.Add(newAcc_VoucherDet); } Acc_VoucherDetCollection.InsertSpName = "spInsertAcc_VoucherDet"; Acc_VoucherDetCollection.UpdateSpName = "spUpdateAcc_VoucherDet"; Acc_VoucherDetCollection.DeleteSpName = "spDeleteAcc_VoucherDet"; return Acc_VoucherDetCollection; } catch (Exception ex) { throw (ex); } finally { if (reader != null && !reader.IsClosed) reader.Close(); } }
public static CustomList<Acc_VoucherDet> GetAllAcc_VoucherDet(Int64 voucherKey) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); CustomList<Acc_VoucherDet> Acc_VoucherDetCollection = new CustomList<Acc_VoucherDet>(); IDataReader reader = null; String sql = "select VoucherDetKey,VoucherKey,COAKey,PartyKey,BranchID,CostCenterID,Convert(Decimal(18,2),Dr)Dr,Convert(Decimal(18,2),Cr)Cr from Acc_VoucherDet Where VoucherKey=" + voucherKey; try { conManager.OpenDataReader(sql, out reader); while (reader.Read()) { Acc_VoucherDet newAcc_VoucherDet = new Acc_VoucherDet(); newAcc_VoucherDet.SetData(reader); Acc_VoucherDetCollection.Add(newAcc_VoucherDet); } Acc_VoucherDetCollection.InsertSpName = "spInsertAcc_VoucherDet"; Acc_VoucherDetCollection.UpdateSpName = "spUpdateAcc_VoucherDet"; Acc_VoucherDetCollection.DeleteSpName = "spDeleteAcc_VoucherDet"; return Acc_VoucherDetCollection; } catch (Exception ex) { throw (ex); } finally { if (reader != null && !reader.IsClosed) reader.Close(); } }
public static CustomList<Acc_VoucherDet> GetAllAcc_VoucherDet() { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); CustomList<Acc_VoucherDet> Acc_VoucherDetCollection = new CustomList<Acc_VoucherDet>(); IDataReader reader = null; const String sql = "select *from Acc_VoucherDet"; try { conManager.OpenDataReader(sql, out reader); while (reader.Read()) { Acc_VoucherDet newAcc_VoucherDet = new Acc_VoucherDet(); newAcc_VoucherDet.SetData(reader); Acc_VoucherDetCollection.Add(newAcc_VoucherDet); } Acc_VoucherDetCollection.InsertSpName = "spInsertAcc_VoucherDet"; Acc_VoucherDetCollection.UpdateSpName = "spUpdateAcc_VoucherDet"; Acc_VoucherDetCollection.DeleteSpName = "spDeleteAcc_VoucherDet"; return Acc_VoucherDetCollection; } catch(Exception ex) { throw (ex); } finally { if (reader != null && !reader.IsClosed) reader.Close(); } }
public static CustomList<Acc_VoucherDet> CheckBankAndCashVoucher(string searchStr) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); CustomList<Acc_VoucherDet> Acc_VoucherDetCollection = new CustomList<Acc_VoucherDet>(); IDataReader reader = null; String sql = "EXEC spCheckCashAndBank " + searchStr; try { conManager.OpenDataReader(sql, out reader); while (reader.Read()) { Acc_VoucherDet newAcc_VoucherDet = new Acc_VoucherDet(); newAcc_VoucherDet._VoucherNo = reader.GetString("VoucherNo"); newAcc_VoucherDet._Cr = reader.GetDecimal("Cr"); newAcc_VoucherDet._Bal = reader.GetDecimal("Bal"); Acc_VoucherDetCollection.Add(newAcc_VoucherDet); } return Acc_VoucherDetCollection; } catch (Exception ex) { throw (ex); } finally { if (reader != null && !reader.IsClosed) reader.Close(); } }
private void AddNewVoucherRow() { try { String menuName = HttpContext.Current.Request.QueryString["menuName"]; String COAKey = HttpContext.Current.Request.QueryString["COAKey"]; CustomList<Acc_VoucherDet> voucherDetList = (CustomList<Acc_VoucherDet>)HttpContext.Current.Session[menuName + "_AccVoucherDetList"]; if ((menuName == "CashPaymantVoucher" || menuName == "BankPaymentVoucher" || menuName == "BankReceiveVoucher" || menuName == "CashReceiveVoucher") && voucherDetList.Count == 0) { if (COAKey == "") return; Acc_VoucherDet newVoucherCashPayment = new Acc_VoucherDet(); newVoucherCashPayment.COAKey =Convert.ToInt64(COAKey); voucherDetList.Add(newVoucherCashPayment); } Acc_VoucherDet newVoucher = new Acc_VoucherDet(); voucherDetList.Add(newVoucher); } catch (Exception ex) { throw ex; } }