Esempio n. 1
0
        public void SaveAdvance(AdvanceMaster advmaster, LedgerTrnMaster master)
        {
            strsql = " INSERT INTO Advance_File( trDate,trMonth,PayMode,crAcc,drAcc,trRoute)" +
                     " Values (CONVERT(DateTime,'" + String.Format("{0:yyyy-{0:mm}-{0:dd}", advmaster.trDate) + "',102 '" + String.Format("{0:MMM}- {0:yyyy}", advmaster.trDate) + "'," +
                     "'" + advmaster.PayMode + "','" + advmaster.crAcc + "','" + advmaster.drAcc + "','" + advmaster.trRoute + "')";
            db = new DBAccess();
            db.ExecuteQuery(strsql, DBAccess.BoughtLeaf);

            SaveLedger(master);
        }
Esempio n. 2
0
 public AdvanceMaster GetLastAdvanceEntry()
 {
     table   = new DataTable();
     strsql  = "Select top 1 * From Advance_File Order By ListId Desc";
     table   = db.GetDataTable(strsql, DBAccess.BoughtLeaf);
     advHead = new AdvanceMaster();
     if (table.Rows.Count == 1)
     {
         advHead.crAcc   = table.Rows[0]["crAcc"].ToString();
         advHead.drAcc   = table.Rows[0]["drAcc"].ToString();
         advHead.ListId  = int.Parse(table.Rows[0]["ListId"].ToString());
         advHead.PayMode = table.Rows[0]["PayMode"].ToString();
         advHead.trDate  = DateTime.Parse(table.Rows[0]["trDate"].ToString());
         advHead.trMonth = table.Rows[0]["trMonth"].ToString();
         advHead.trRoute = table.Rows[0]["trRoute"].ToString();
     }
     return(advHead);
 }
Esempio n. 3
0
 public BlgAdvance()
 {
     advanceMaster     = new AdvanceMaster();
     transactionMaster = new HashSet <LedgerTrnMaster>();
 }