Ejemplo n.º 1
0
        public void PublishPDF(DateTime?FromDate, DateTime?ToDate)
        {
            string pageTitle = "Admission Fee";

            float[]  size         = new float[] { 4, 4, 4, 4 };
            string[] tableHeaders = new String[] { "Entry No.", "Date", "Collection", "Total" };
            PDF      myPDF        = new PDF(pageTitle, size, tableHeaders);

            string     FDate = FromDate?.ToString("yyyyMMdd");
            string     TDate = ToDate?.ToString("yyyyMMdd");
            Connection conn  = new Connection();

            conn.OpenConection();
            string        query  = "SELECT * FROM AdmissionFee WHERE CAST(Admission_Date AS date) BETWEEN '" + FDate + "' and '" + TDate + "'";
            SqlDataReader reader = conn.DataReader(query);

            while (reader.Read())
            {
                myPDF.AddToTable(reader["Admission_Id"].ToString());
                DateTime OnlyDate = (DateTime)reader["Admission_Date"];
                myPDF.AddToTable(OnlyDate.ToString("dd-MM-yyyy"));
                myPDF.AddToTable(reader["Admission_Collection"].ToString());
                myPDF.AddToTable(reader["Admission_Total"].ToString());
            }
            conn.CloseConnection();
            myPDF.Done();
        }
Ejemplo n.º 2
0
        public void PublishPDFLedger(DateTime?FromDate, DateTime?ToDate, int id)
        {
            string pageTitle = "Monthly Deposit";

            float[]    size         = new float[] { 3, 2, 3, 3, 3, 3, 3, 3 };
            string[]   tableHeaders = new String[] { "Entry No.", "Account No", "Member ID", "Date", "Details", "Deposit", "Withdraw", "Balance" };
            PDF        myPDF        = new PDF(pageTitle, size, tableHeaders);
            string     FDate        = FromDate?.ToString("yyyyMMdd");
            string     TDate        = ToDate?.ToString("yyyyMMdd");
            Connection conn         = new Connection();

            conn.OpenConection();
            string        query  = "SELECT * From MonthlyDepositLedger where FixedId = " + id + " AND CAST(MonthlyDate AS date) BETWEEN '" + FDate + "' and '" + TDate + "'";
            SqlDataReader reader = conn.DataReader(query);

            while (reader.Read())
            {
                myPDF.AddToTable(reader["MonthlyEntryId"].ToString());
                myPDF.AddToTable(reader["MonthlyId"].ToString());
                myPDF.AddToTable(reader["MemberId"].ToString());
                DateTime OnlyDate = (DateTime)reader["MonthlyDate"];
                myPDF.AddToTable(OnlyDate.ToString("dd-MM-yyyy"));
                myPDF.AddToTable(reader["MonthlyDetails"].ToString());
                myPDF.AddToTable(reader["MonthlyDeposit"].ToString());
                myPDF.AddToTable(reader["MonthlyWithdraw"].ToString());
                myPDF.AddToTable(reader["MonthlyBalance"].ToString());
            }

            conn.CloseConnection();
            myPDF.Done();
        }
Ejemplo n.º 3
0
        public void PublishPDF(DateTime?FromDate, DateTime?ToDate)
        {
            string pageTitle = "Loanee List";

            float[]  size         = new float[] { 3, 3, 3, 3, 3, 3, 3, 3 };
            string[] tableHeaders = new String[] { "Loan No.", "Name", "Account ID", "Amount", "Balance", "Method", "Last Paid", "Total" };
            PDF      myPDF        = new PDF(pageTitle, size, tableHeaders);

            Connection conn = new Connection();

            conn.OpenConection();
            string        query  = "Select m.MemberName, l.* From LoanDetails l Left Join Member m ON l.LoanDetails_Account=m.MemberId";
            SqlDataReader reader = conn.DataReader(query);

            while (reader.Read())
            {
                myPDF.AddToTable(reader["LoanDetails_Id"].ToString());
                myPDF.AddToTable(reader["MemberName"].ToString());
                myPDF.AddToTable(reader["LoanDetails_Account"].ToString());
                myPDF.AddToTable(reader["LoanDetails_Amount"].ToString());
                myPDF.AddToTable(reader["LoanDetails_Balance"].ToString());
                myPDF.AddToTable(reader["LoanDetails_Collection"].ToString());
                DateTime OnlyDate = (DateTime)reader["LoanDetails_LastPaid"];
                myPDF.AddToTable(OnlyDate.ToString("dd-MM-yyyy"));
                myPDF.AddToTable(reader["LoanDetails_Total"].ToString());
            }

            conn.CloseConnection();
            myPDF.Done();
        }
Ejemplo n.º 4
0
        public void PublishPDF(DateTime?FromDate, DateTime?ToDate)
        {
            string pageTitle = "Reserved Fund";

            float[]  size         = new float[] { 3, 3, 3, 3, 3, 3, 3 };
            string[] tableHeaders = new String[] { "Entry No.", "Date", "Previous", "Current", "Remaining", "Withdraw", "Total" };
            PDF      myPDF        = new PDF(pageTitle, size, tableHeaders);

            string     FDate = FromDate?.ToString("yyyyMMdd");
            string     TDate = ToDate?.ToString("yyyyMMdd");
            Connection conn  = new Connection();

            conn.OpenConection();
            string        query  = "SELECT * FROM ReservedFund WHERE CAST(Reserved_Date AS date) BETWEEN '" + FDate + "' and '" + TDate + "'";
            SqlDataReader reader = conn.DataReader(query);

            while (reader.Read())
            {
                myPDF.AddToTable(reader["Reserved_Id"].ToString());
                DateTime OnlyDate = (DateTime)reader["Reserved_Date"];
                myPDF.AddToTable(OnlyDate.ToString("dd-MM-yyyy"));
                myPDF.AddToTable(reader["Reserved_Previous"].ToString());
                myPDF.AddToTable(reader["Reserved_Current"].ToString());
                myPDF.AddToTable(reader["Reserved_Remaining"].ToString());
                myPDF.AddToTable(reader["Reserved_Withdraw"].ToString());
                myPDF.AddToTable(reader["Reserved_Total"].ToString());
            }
            conn.CloseConnection();
            myPDF.Done();
        }
        public void PublishPDF(DateTime?FromDate, DateTime?ToDate)
        {
            string pageTitle = "Cash in Hand";

            float[]  size         = new float[] { 3, 3, 3, 3, 3, 3, 3 };
            string[] tableHeaders = new String[] { "Entry No.", "Date", "Previous", "Deposit", "Expenses", "Remains", "Total" };
            PDF      myPDF        = new PDF(pageTitle, size, tableHeaders);

            string     FDate = FromDate?.ToString("yyyyMMdd");
            string     TDate = ToDate?.ToString("yyyyMMdd");
            Connection conn  = new Connection();

            conn.OpenConection();
            string        query  = "SELECT * FROM CashInformation WHERE CAST(Cash_Date AS date) BETWEEN '" + FDate + "' and '" + TDate + "'";
            SqlDataReader reader = conn.DataReader(query);

            while (reader.Read())
            {
                myPDF.AddToTable(reader["Cash_Id"].ToString());
                DateTime OnlyDate = (DateTime)reader["Cash_Date"];
                myPDF.AddToTable(OnlyDate.ToString("dd-MM-yyyy"));
                myPDF.AddToTable(reader["Cash_Previous"].ToString());
                myPDF.AddToTable(reader["Cash_Deposit"].ToString());
                myPDF.AddToTable(reader["Cash_Expenses"].ToString());
                myPDF.AddToTable(reader["Cash_Remains"].ToString());
                myPDF.AddToTable(reader["Cash_Total"].ToString());
            }
            conn.CloseConnection();
            myPDF.Done();
        }
Ejemplo n.º 6
0
        public void PublishPDF(DateTime?FromDate, DateTime?ToDate)
        {
            string pageTitle = "Bank Account Information";

            float[]  size         = new float[] { 3, 3, 3, 3, 3, 3, 3 };
            string[] tableHeaders = new String[] { "Entry No.", "Date", "Deposit", "Interest", "Withdraw", "Service Charge", "Remains" };
            PDF      myPDF        = new PDF(pageTitle, size, tableHeaders);

            string     FDate = FromDate?.ToString("yyyyMMdd");
            string     TDate = ToDate?.ToString("yyyyMMdd");
            Connection conn  = new Connection();

            conn.OpenConection();
            string        query  = "SELECT * FROM BankAccount WHERE CAST(BankAccount_Date AS date) BETWEEN '" + FDate + "' and '" + TDate + "'";
            SqlDataReader reader = conn.DataReader(query);

            while (reader.Read())
            {
                myPDF.AddToTable(reader["BankAccount_Id"].ToString());
                DateTime OnlyDate = (DateTime)reader["BankAccount_Date"];
                myPDF.AddToTable(OnlyDate.ToString("dd-MM-yyyy"));
                myPDF.AddToTable(reader["BankAccount_Deposit"].ToString());
                myPDF.AddToTable(reader["BankAccount_Interest"].ToString());
                myPDF.AddToTable(reader["BankAccount_Withdraw"].ToString());
                myPDF.AddToTable(reader["BankAccount_ServiceCharge"].ToString());
                myPDF.AddToTable(reader["BankAccount_Remains"].ToString());
            }
            conn.CloseConnection();
            myPDF.Done();
        }
Ejemplo n.º 7
0
        public void PublishPDFLedger(DateTime?FromDate, DateTime?ToDate, string method)
        {
            string pageTitle = "Loan Ledger";

            float[]  size         = new float[] { 3, 2, 3, 3, 3, 3 };
            string[] tableHeaders = new String[] { "Entry No.", "Date", "Loan ID", "Collection", "Installment", "Balance" };
            PDF      myPDF        = new PDF(pageTitle, size, tableHeaders);



            string FDate = FromDate?.ToString("yyyyMMdd");
            string TDate = ToDate?.ToString("yyyyMMdd");

            Connection conn = new Connection();

            conn.OpenConection();
            string        query  = "SELECT * FROM [LoanCollection] WHERE LoanCollection_Method = '" + method + "' AND CAST(LoanCollection_Date AS date) BETWEEN '" + FDate + "' and '" + TDate + "'";
            SqlDataReader reader = conn.DataReader(query);

            while (reader.Read())
            {
                myPDF.AddToTable(reader["LoanCollection_Id"].ToString());
                DateTime OnlyDate = (DateTime)reader["LoanCollection_Date"];
                myPDF.AddToTable(OnlyDate.ToString("dd-MM-yyyy"));
                myPDF.AddToTable(reader["LoanCollection_Loan"].ToString());
                myPDF.AddToTable(reader["LoanCollection_Collection"].ToString());
                myPDF.AddToTable(reader["LoanCollection_Installment"].ToString());
                myPDF.AddToTable(reader["LoanCollection_Balance"].ToString());
            }

            conn.CloseConnection();
            myPDF.Done();
        }
Ejemplo n.º 8
0
        public void PublishPDF(DateTime?FromDate, DateTime?ToDate)
        {
            string pageTitle = "Cooperative Development Fund";

            float[]  size         = new float[] { 3, 4, 3, 3, 4, 4 };
            string[] tableHeaders = new String[] { "Entry No.", "Date", "Current", "Paid", "Previous", "Remains" };
            PDF      myPDF        = new PDF(pageTitle, size, tableHeaders);

            string     FDate = FromDate?.ToString("yyyyMMdd");
            string     TDate = ToDate?.ToString("yyyyMMdd");
            Connection conn  = new Connection();

            conn.OpenConection();
            string        query  = "SELECT * FROM CooperativeDevelopment WHERE CAST(Cooperative_Date AS date) BETWEEN '" + FDate + "' and '" + TDate + "'";
            SqlDataReader reader = conn.DataReader(query);

            while (reader.Read())
            {
                myPDF.AddToTable(reader["Cooperative_Id"].ToString());
                DateTime OnlyDate = (DateTime)reader["Cooperative_Date"];
                myPDF.AddToTable(OnlyDate.ToString("dd-MM-yyyy"));
                myPDF.AddToTable(reader["Cooperative_Current"].ToString());
                myPDF.AddToTable(reader["Cooperative_Paid"].ToString());
                myPDF.AddToTable(reader["Cooperative_Previous"].ToString());
                myPDF.AddToTable(reader["Cooperative_Remains"].ToString());
            }
            conn.CloseConnection();
            myPDF.Done();
        }
Ejemplo n.º 9
0
        public void PublishPDFIndividualLedger(DateTime?FromDate, DateTime?ToDate, int id, string method)
        {
            string pageTitle = "Loan Ledger";

            float[]  size         = new float[] { 3, 2, 3, 3, 3, 3 };
            string[] tableHeaders = new String[] { "Entry No.", "Date", "Loan ID", "Collection", "Installment", "Balance" };
            PDF      myPDF        = new PDF(pageTitle, size, tableHeaders);



            string FDate = FromDate?.ToString("yyyyMMdd");
            string TDate = ToDate?.ToString("yyyyMMdd");

            Connection conn = new Connection();

            conn.OpenConection();
            string        query  = "SELECT * FROM [LoanCollection] WHERE LoanCollection_Method = '" + method + "' AND LoanCollection_Loan = " + id + " AND CAST(LoanCollection_Date AS date) BETWEEN '" + FDate + "' and '" + TDate + "'";
            SqlDataReader reader = conn.DataReader(query);

            while (reader.Read())
            {
                myPDF.AddToTable(reader["LoanCollection_Id"].ToString());
                DateTime OnlyDate = (DateTime)reader["LoanCollection_Date"];
                myPDF.AddToTable(OnlyDate.ToString("dd-MM-yyyy"));
                myPDF.AddToTable(reader["LoanCollection_Loan"].ToString());
                myPDF.AddToTable(reader["LoanCollection_Collection"].ToString());
                myPDF.AddToTable(reader["LoanCollection_Installment"].ToString());
                myPDF.AddToTable(reader["LoanCollection_Balance"].ToString());
            }

            conn.CloseConnection();

            Connection conn1 = new Connection();

            conn1.OpenConection();
            string        firstquery = "Select m.MemberName From LoanDetails l Left Join Member m ON l.LoanDetails_Account=m.MemberId where l.LoanDetails_Id = " + id;
            SqlDataReader reader1    = conn1.DataReader(firstquery);
            string        name       = "";

            while (reader1.Read())
            {
                name = "Name : " + reader1["MemberName"].ToString();
            }

            myPDF.AddParagraph("Name : " + name);
            conn1.CloseConnection();

            myPDF.Done();
        }