public List <TransactionInMaster> GetTransactionInMasterList()
        {
            List <TransactionInMaster> list = null;

            string commandText = OleDBHelper.GetQueryText("TransactionInMaster_SelectAll", QueryType.Views);


            using (DataTable table = OleDBHelper.ExecuteSelectCommand(commandText, CommandType.Text))
            {
                //check if any record exist or not
                if (table.Rows.Count > 0)
                {
                    //Lets go ahead and create the list of employees
                    list = new List <TransactionInMaster>();

                    //Now lets populate the employee details into the list of employees
                    foreach (DataRow row in table.Rows)
                    {
                        TransactionInMaster obj = new TransactionInMaster();
                        obj.TransactionID   = Convert.ToString(row["TransactionID"]);
                        obj.TransactionDate = Convert.ToDateTime(row["TransactionDate"]);
                        obj.PartyID         = Convert.ToString(row["PartyID"]);
                        obj.Amount          = Convert.ToDecimal(Convert.IsDBNull(row["Amount"]) ? 0 : row["Amount"]);
                        obj.Remarks         = Convert.ToString(row["Remarks"]);
                        list.Add(obj);
                    }
                }
            }

            return(list);
        }
        public TransactionInMaster GetTransactionInMaster(string transactionID)
        {
            TransactionInMaster obj = null;

            string commandText = OleDBHelper.GetQueryText("TransactionInMaster_SelectID", QueryType.Procedures);

            OleDbParameter[] parameters = new OleDbParameter[]
            {
                new OleDbParameter("@TransactionID", transactionID)
            };

            using (DataTable table = OleDBHelper.ExecuteParamerizedSelectCommand(commandText, CommandType.Text, parameters))
            {
                //check if any record exist or not
                if (table.Rows.Count > 0)
                {
                    //Lets go ahead and create the list of employees
                    obj = new TransactionInMaster();

                    obj.TransactionID   = Convert.ToString(table.Rows[0]["TransactionID"]);
                    obj.TransactionDate = Convert.ToDateTime(table.Rows[0]["TransactionDate"]);
                    obj.PartyID         = Convert.ToString(table.Rows[0]["PartyID"]);
                    obj.Amount          = Convert.ToDecimal(Convert.IsDBNull(table.Rows[0]["Amount"]) ? 0 : table.Rows[0]["Amount"]);
                    obj.Remarks         = Convert.ToString(table.Rows[0]["Remarks"]);
                }
            }

            return(obj);
        }
Esempio n. 3
0
        public ItemMaster GetItemMasterDetails(String itemID)
        {
            ItemMaster obj = null;

            string commandText = OleDBHelper.GetQueryText("ItemMaster_SelectID", QueryType.Procedures);

            OleDbParameter[] parameters = new OleDbParameter[]
            {
                new OleDbParameter("@ItemID", itemID)
            };

            using (DataTable table = OleDBHelper.ExecuteParamerizedSelectCommand(commandText, CommandType.Text, parameters))
            {
                //check if any record exist or not
                if (table.Rows.Count > 0)
                {
                    //Lets go ahead and create the list of employees
                    obj = new ItemMaster();

                    obj.ItemID   = Convert.ToString(table.Rows[0]["ItemID"]);
                    obj.ItemName = Convert.ToString(table.Rows[0]["ItemName"]);
                    obj.Remarks  = Convert.ToString(table.Rows[0]["Remarks"]);
                }
            }

            return(obj);
        }
Esempio n. 4
0
        public PartyMaster GetPartyMasterDetails(String partyID)
        {
            PartyMaster obj = null;

            string commandText = OleDBHelper.GetQueryText("PartyMaster_SelectID", QueryType.Procedures);

            OleDbParameter[] parameters = new OleDbParameter[]
            {
                new OleDbParameter("@PartyID", partyID)
            };

            using (DataTable table = OleDBHelper.ExecuteParamerizedSelectCommand(commandText, CommandType.Text, parameters))
            {
                //check if any record exist or not
                if (table.Rows.Count > 0)
                {
                    //Lets go ahead and create the list of employees
                    obj = new PartyMaster();

                    obj.PartyID      = Convert.ToString(table.Rows[0]["PartyID"]);
                    obj.PartyName    = Convert.ToString(table.Rows[0]["PartyName"]);
                    obj.PersonName   = Convert.ToString(table.Rows[0]["PersonName"]);
                    obj.Address      = Convert.ToString(table.Rows[0]["Address"]);
                    obj.ContactNo    = Convert.ToString(table.Rows[0]["ContactNo"]);
                    obj.Mobile       = Convert.ToString(table.Rows[0]["Mobile"]);
                    obj.EamilAddress = Convert.ToString(table.Rows[0]["EamilAddress"]);
                    obj.Remarks      = Convert.ToString(table.Rows[0]["Remarks"]);
                }
            }

            return(obj);
        }
Esempio n. 5
0
        public Inventory GetInventoryDetails(Inventory obj)
        {
            Inventory objDetails = null;

            string commandText = OleDBHelper.GetQueryText("Inventory_SelectID", QueryType.Procedures);

            OleDbParameter[] parameters = new OleDbParameter[]
            {
                new OleDbParameter("@ItemID", obj.ItemID)
                //new OleDbParameter("@UnitID", obj.UnitID)
            };

            using (DataTable table = OleDBHelper.ExecuteParamerizedSelectCommand(commandText, CommandType.Text, parameters))
            {
                //check if any record exist or not
                if (table.Rows.Count > 0)
                {
                    //Lets go ahead and create the list of employees
                    objDetails = new Inventory();

                    objDetails.ItemID      = Convert.ToString(table.Rows[0]["ItemID"]);
                    objDetails.UnitID      = Convert.ToString(table.Rows[0]["UnitID"]);
                    objDetails.LastTranID  = Convert.ToString(table.Rows[0]["LastTranID"]);
                    objDetails.QtyIn       = Convert.IsDBNull(table.Rows[0]["QtyIn"])? 0 : Convert.ToInt32(table.Rows[0]["QtyIn"]);
                    objDetails.QtyOut      = Convert.IsDBNull(table.Rows[0]["QtyOut"]) ? 0 : Convert.ToInt32(table.Rows[0]["QtyOut"]);
                    objDetails.PrevBalance = Convert.IsDBNull(table.Rows[0]["PrevBalance"]) ? 0 : Convert.ToInt32(table.Rows[0]["PrevBalance"]);
                    objDetails.CurrBalance = Convert.IsDBNull(table.Rows[0]["CurrBalance"]) ? 0 : Convert.ToInt32(table.Rows[0]["CurrBalance"]);
                }
            }

            return(objDetails);
        }
Esempio n. 6
0
        public bool AddNewInventory(List <Inventory> objList)
        {
            string commandText = OleDBHelper.GetQueryText("Inventory_Insert", QueryType.Procedures);

            int count = objList.Count;

            OleDbParameter[] parameters;
            bool             result = false;

            if (count > 0)
            {
                foreach (Inventory obj in objList)
                {
                    parameters = new OleDbParameter[]
                    {
                        new OleDbParameter("@ItemID", obj.ItemID),
                        new OleDbParameter("@UnitID", obj.UnitID),
                        new OleDbParameter("@LastTranID", obj.LastTranID),
                        new OleDbParameter("@QtyIn", obj.QtyIn),
                        new OleDbParameter("@QtyOut", obj.QtyOut),
                        new OleDbParameter("@PrevBalance", obj.PrevBalance),
                        new OleDbParameter("@CurrBalance", obj.CurrBalance),
                        new OleDbParameter("@CreatedOn", GlobalFunction.GetDateTimeWithoutMiliSecond(DateTime.Now))
                    };

                    result = OleDBHelper.ExecuteNonQuery(commandText, CommandType.Text, parameters);
                    if (result == false)
                    {
                        break;
                    }
                }
            }

            return(result);
        }
Esempio n. 7
0
        public List <ItemMaster> GetItemMasterList()
        {
            List <ItemMaster> list = null;

            string commandText = OleDBHelper.GetQueryText("ItemMaster_SelectAll", QueryType.Views);


            using (DataTable table = OleDBHelper.ExecuteSelectCommand(commandText, CommandType.Text))
            {
                //check if any record exist or not
                if (table.Rows.Count > 0)
                {
                    //Lets go ahead and create the list of employees
                    list = new List <ItemMaster>();

                    //Now lets populate the employee details into the list of employees
                    foreach (DataRow row in table.Rows)
                    {
                        ItemMaster obj = new ItemMaster();

                        obj.ItemID   = Convert.ToString(row["ItemID"]);
                        obj.ItemName = Convert.ToString(row["ItemName"]);
                        obj.Remarks  = Convert.ToString(row["Remarks"]);

                        list.Add(obj);
                    }
                }
            }

            return(list);
        }
Esempio n. 8
0
        public BooksMaster GetBooksMasterDetails(String bookID)
        {
            BooksMaster obj = null;

            string commandText = OleDBHelper.GetQueryText("BooksMaster_SelectID", QueryType.Procedures);

            OleDbParameter[] parameters = new OleDbParameter[]
            {
                new OleDbParameter("@BookID", bookID)
            };

            using (DataTable table = OleDBHelper.ExecuteParamerizedSelectCommand(commandText, CommandType.Text, parameters))
            {
                //check if any record exist or not
                if (table.Rows.Count > 0)
                {
                    //Lets go ahead and create the list of employees
                    obj = new BooksMaster();

                    obj.BookID      = Convert.ToString(table.Rows[0]["BookID"]);
                    obj.ISBN        = Convert.ToString(table.Rows[0]["ISBN"]);
                    obj.Title       = Convert.ToString(table.Rows[0]["Title"]);
                    obj.Subject     = Convert.ToString(table.Rows[0]["Subject"]);
                    obj.Author      = Convert.ToString(table.Rows[0]["Author"]);
                    obj.Publication = Convert.ToString(table.Rows[0]["Publication"]);
                    obj.EditionNo   = Convert.ToInt32(table.Rows[0]["EditionNo"]);
                    obj.EditionYear = Convert.ToInt32(table.Rows[0]["EditionYear"]);
                    obj.Price       = Convert.ToInt32(table.Rows[0]["Price"]);
                }
            }

            return(obj);
        }
Esempio n. 9
0
        public bool AddNewTransactionInDetails(List <BooksTransactionInDetails> objList)
        {
            string commandText = OleDBHelper.GetQueryText("BooksTransactionInDetails_Insert", QueryType.Procedures);

            int count = objList.Count;

            OleDbParameter[] parameters;
            bool             result = false;

            if (count > 0)
            {
                foreach (BooksTransactionInDetails obj in objList)
                {
                    parameters = new OleDbParameter[]
                    {
                        new OleDbParameter("@TransactionID", obj.TransactionID),
                        new OleDbParameter("@BookID", obj.BookMaster.BookID),
                        new OleDbParameter("@Unit", obj.Unit)
                    };

                    result = OleDBHelper.ExecuteNonQuery(commandText, CommandType.Text, parameters);
                    if (result == false)
                    {
                        break;
                    }
                }
            }

            return(result);
        }
Esempio n. 10
0
        public bool AddNewItemMaster(ItemMaster obj)
        {
            OleDbParameter[] parameters = new OleDbParameter[]
            {
                new OleDbParameter("@ItemID", obj.ItemID),
                new OleDbParameter("@ItemName", obj.ItemName),
                new OleDbParameter("@Remarks", obj.Remarks),
                new OleDbParameter("@CreatedOn", GlobalFunction.GetDateTimeWithoutMiliSecond(DateTime.Now))
            };
            string commandText = OleDBHelper.GetQueryText("ItemMaster_Insert", QueryType.Procedures);

            return(OleDBHelper.ExecuteNonQuery(commandText, CommandType.Text, parameters));
        }
Esempio n. 11
0
        public static bool UpdateUniqueCodeForTable(string tableName)
        {
            bool result;

            OleDbParameter[] parameters = new OleDbParameter[]
            {
                new OleDbParameter("@TableName", tableName)
            };
            string commandText = OleDBHelper.GetQueryText("UniqueCodeMaster_Update", QueryType.Procedures);

            result = OleDBHelper.ExecuteNonQuery(commandText, CommandType.Text, parameters);
            return(result);
        }
Esempio n. 12
0
        public static DataTable GetUniqueCodeForTable(string tableName)
        {
            DataTable dt = new DataTable();

            OleDbParameter[] parameters = new OleDbParameter[]
            {
                new OleDbParameter("@TableName", tableName)
            };
            string commandText = OleDBHelper.GetQueryText("GetUniqueCodeForTable", QueryType.Procedures);

            dt = OleDBHelper.ExecuteParamerizedSelectCommand(commandText, CommandType.Text, parameters);
            return(dt);
        }
Esempio n. 13
0
        // Same can be used for deactive user
        public bool DeleteTransactionOutDetails(string transactionID)
        {
            string commandText = OleDBHelper.GetQueryText("TransactionOutDetails_Delete", QueryType.Procedures);

            OleDbParameter[] parameters = new OleDbParameter[]
            {
                new OleDbParameter("@TransactionID", transactionID)
            };
            bool result = false;

            result = OleDBHelper.ExecuteNonQuery(commandText, CommandType.Text, parameters);
            return(result);
        }
Esempio n. 14
0
        public bool AddNewAccount(Account account)
        {
            OleDbParameter[] parameters = new OleDbParameter[]
            {
                new OleDbParameter("@ID", account.ID),
                new OleDbParameter("@AccountHolderName", account.AccountHolderName),
                new OleDbParameter("@DOB", account.DateOfBirth),
                new OleDbParameter("@IsActive", 1),
                new OleDbParameter("@CreatedOn", GlobalFunction.GetDateTimeWithoutMiliSecond(DateTime.Now))
            };
            string commandText = OleDBHelper.GetQueryText("AccountMaster1_Insert", QueryType.Procedures);

            return(OleDBHelper.ExecuteNonQuery(commandText, CommandType.Text, parameters));
        }
Esempio n. 15
0
        public bool UpdateTransactionOutMaster(BooksTransactionOutMaster obj)
        {
            OleDbParameter[] parameters = new OleDbParameter[]
            {
                new OleDbParameter("@TransactionDate", obj.TransactionDate),
                new OleDbParameter("@Remarks", obj.Remarks),
                new OleDbParameter("@CreatedOn", GlobalFunction.GetDateTimeWithoutMiliSecond(DateTime.Now)),
                new OleDbParameter("@TransactionID", obj.TransactionID)
            };

            string commandText = OleDBHelper.GetQueryText("BooksTransactionOutMaster_Update", QueryType.Procedures);

            return(OleDBHelper.ExecuteNonQuery(commandText, CommandType.Text, parameters));
        }
Esempio n. 16
0
        public List <BooksMaster> SearchBooksMasterList(string searchText)
        {
            searchText = "%" + searchText + "%";
            List <BooksMaster> list = null;

            string commandText = OleDBHelper.GetQueryText("Search_BooksMaster", QueryType.Procedures);

            OleDbParameter[] parameters = new OleDbParameter[]
            {
                new OleDbParameter("@BookID", searchText),
                new OleDbParameter("@ISBN", searchText),
                new OleDbParameter("@Title]", searchText),
                new OleDbParameter("@Subject", searchText),
                new OleDbParameter("@Author", searchText),
                new OleDbParameter("@Publication", searchText)
                //new OleDbParameter("@EditionNo", searchText),
                //new OleDbParameter("@EditionYear", searchText)
                //new OleDbParameter("@Price", book.Price),
            };
            using (DataTable table = OleDBHelper.ExecuteParamerizedSelectCommand(commandText, CommandType.Text, parameters))
            {
                //check if any record exist or not
                if (table.Rows.Count > 0)
                {
                    //Lets go ahead and create the list of employees
                    list = new List <BooksMaster>();

                    //Now lets populate the employee details into the list of employees
                    foreach (DataRow row in table.Rows)
                    {
                        BooksMaster obj = new BooksMaster();

                        obj.BookID      = Convert.ToString(row["BookID"]);
                        obj.ISBN        = Convert.ToString(row["ISBN"]);
                        obj.Title       = Convert.ToString(row["Title"]);
                        obj.Subject     = Convert.ToString(row["Subject"]);
                        obj.Author      = Convert.ToString(row["Author"]);
                        obj.Publication = Convert.ToString(row["Publication"]);
                        obj.EditionNo   = Convert.ToInt32(row["EditionNo"]);
                        obj.EditionYear = Convert.ToInt32(row["EditionYear"]);
                        obj.Price       = Convert.ToInt32(row["Price"]);

                        list.Add(obj);
                    }
                }
            }

            return(list);
        }
        public bool AddNewTransactionInMaster(TransactionInMaster obj)
        {
            OleDbParameter[] parameters = new OleDbParameter[]
            {
                new OleDbParameter("@TransactionID", obj.TransactionID),
                new OleDbParameter("@TransactionDate", obj.TransactionDate),
                new OleDbParameter("@PartyID", obj.PartyID),
                new OleDbParameter("@Amount", obj.Amount),
                new OleDbParameter("@Remarks", obj.Remarks),
                new OleDbParameter("@CreatedOn", GlobalFunction.GetDateTimeWithoutMiliSecond(DateTime.Now))
            };

            string commandText = OleDBHelper.GetQueryText("TransactionInMaster_Insert", QueryType.Procedures);

            return(OleDBHelper.ExecuteNonQuery(commandText, CommandType.Text, parameters));
        }
Esempio n. 18
0
        public bool AddNewPartyMaster(PartyMaster obj)
        {
            OleDbParameter[] parameters = new OleDbParameter[]
            {
                new OleDbParameter("@PartyID", obj.PartyID),
                new OleDbParameter("@PartyName", obj.PartyName),
                new OleDbParameter("@PersonName", obj.PersonName),
                new OleDbParameter("@Address", obj.Address),
                new OleDbParameter("@ContactNo", obj.ContactNo),
                new OleDbParameter("@Mobile", obj.Mobile),
                new OleDbParameter("@EamilAddress", obj.EamilAddress),
                new OleDbParameter("@Remarks", obj.Remarks),
                new OleDbParameter("@CreatedOn", GlobalFunction.GetDateTimeWithoutMiliSecond(DateTime.Now))
            };
            string commandText = OleDBHelper.GetQueryText("PartyMaster_Insert", QueryType.Procedures);

            return(OleDBHelper.ExecuteNonQuery(commandText, CommandType.Text, parameters));
        }
Esempio n. 19
0
        public List <TransactionInDetails> GetTransactionInList(string transactionID)
        {
            List <TransactionInDetails> list = null;

            string commandText = OleDBHelper.GetQueryText("TransactionInDetails_SelectID", QueryType.Procedures);

            OleDbParameter[] parameters = new OleDbParameter[]
            {
                new OleDbParameter("@TransactionID", transactionID)
            };

            using (DataTable table = OleDBHelper.ExecuteParamerizedSelectCommand(commandText, CommandType.Text, parameters))
            {
                //check if any record exist or not
                if (table.Rows.Count > 0)
                {
                    //Lets go ahead and create the list of employees
                    list = new List <TransactionInDetails>();


                    ItemMaster itemHandler = new ItemMaster();
                    //Now lets populate the employee details into the list of employees
                    foreach (DataRow row in table.Rows)
                    {
                        TransactionInDetails obj = new TransactionInDetails();

                        obj.TransactionID = Convert.ToString(row["TransactionID"]);
                        obj.ItemMaster    = itemHandler.GetItemMasterDetails(Convert.ToString(row["ItemID"]));
                        obj.Unit          = Convert.ToInt32(row["Unit"]);
                        obj.Rate          = Convert.ToDecimal(Convert.IsDBNull(row["Rate"]) ? 0 : row["Rate"]);
                        obj.Amount        = Convert.ToDecimal(Convert.IsDBNull(row["Amount"]) ? 0 : row["Amount"]);
                        //obj.Subject = Convert.ToString(row["Subject"]);
                        //obj.Author = Convert.ToString(row["Author"]);
                        //obj.Publication = Convert.ToString(row["Publication"]);
                        //obj.EditionNo = Convert.ToInt32(row["EditionNo"]);
                        //obj.EditionYear = Convert.ToInt32(row["EditionYear"]);
                        //obj.Price = Convert.ToInt32(row["Price"]);
                        list.Add(obj);
                    }
                }
            }

            return(list);
        }
Esempio n. 20
0
        public List <Inventory> GetInventoryList()
        {
            List <Inventory> list = null;

            string commandText = OleDBHelper.GetQueryText("Inventory_SelectAll", QueryType.Views);

            OleDbParameter[] parameters = new OleDbParameter[]
            {
                //new OleDbParameter("@TransactionID", transactionID)
            };

            using (DataTable table = OleDBHelper.ExecuteSelectCommand(commandText, CommandType.Text))
            {
                //check if any record exist or not
                if (table.Rows.Count > 0)
                {
                    //Lets go ahead and create the list of employees
                    list = new List <Inventory>();


                    Inventory  obj;
                    ItemMaster objItemMaster;
                    //Now lets populate the employee details into the list of employees
                    foreach (DataRow row in table.Rows)
                    {
                        obj           = new Inventory();
                        objItemMaster = new ItemMaster();


                        objItemMaster.ItemID   = Convert.ToString(row["ItemID"]);
                        objItemMaster.ItemName = Convert.ToString(row["ItemName"]);
                        //obj.LastTranID = Convert.ToString(row["LastTranID"]);
                        obj.ItemMaster = objItemMaster;
                        obj.QtyIn      = Convert.IsDBNull(row["QtyIn"]) ? 0 : Convert.ToInt32(row["QtyIn"]);
                        obj.QtyOut     = Convert.IsDBNull(row["QtyOut"]) ? 0 : Convert.ToInt32(row["QtyOut"]);
                        //obj.CurrBalance = Convert.IsDBNull(row["QtyBalance"]) ? 0 : Convert.ToInt32(row["QtyBalance"]);

                        list.Add(obj);
                    }
                }
            }

            return(list);
        }
Esempio n. 21
0
        public bool AddNewBooksMaster(BooksMaster book)
        {
            OleDbParameter[] parameters = new OleDbParameter[]
            {
                new OleDbParameter("@BookID", book.BookID),
                new OleDbParameter("@ISBN", book.ISBN),
                new OleDbParameter("@Title", book.Title),
                new OleDbParameter("@Title", book.Subject),
                new OleDbParameter("@Author", book.Author),
                new OleDbParameter("@Publication", book.Publication),
                new OleDbParameter("@EditionNo", book.EditionNo),
                new OleDbParameter("@EditionYear", book.EditionYear),
                new OleDbParameter("@Price", book.Price),
                new OleDbParameter("@CreatedOn", GlobalFunction.GetDateTimeWithoutMiliSecond(DateTime.Now))
            };
            string commandText = OleDBHelper.GetQueryText("BooksMaster_Insert", QueryType.Procedures);

            return(OleDBHelper.ExecuteNonQuery(commandText, CommandType.Text, parameters));
        }
Esempio n. 22
0
        public bool UpdateInventory(Inventory obj)
        {
            string commandText = OleDBHelper.GetQueryText("Inventory_Update", QueryType.Procedures);

            OleDbParameter[] parameters = new OleDbParameter[]
            {
                new OleDbParameter("@LastTranID", obj.LastTranID),
                new OleDbParameter("@QtyIn", obj.QtyIn),
                new OleDbParameter("@QtyOut", obj.QtyOut),
                new OleDbParameter("@PrevBalance", obj.PrevBalance),
                new OleDbParameter("@CurrBalance", obj.CurrBalance),
                new OleDbParameter("@UpdatedOn", GlobalFunction.GetDateTimeWithoutMiliSecond(DateTime.Now)),
                new OleDbParameter("@ItemID", obj.ItemID)
                //new OleDbParameter("@UnitID", obj.UnitID)
            };


            return(OleDBHelper.ExecuteNonQuery(commandText, CommandType.Text, parameters));
        }
Esempio n. 23
0
        public DataTable GetBooksMasterTable()
        {
            DataTable dt = null;

            string commandText = OleDBHelper.GetQueryText("rptBooksMaster", QueryType.Views);


            using (DataTable table = OleDBHelper.ExecuteSelectCommand(commandText, CommandType.Text))
            {
                //check if any record exist or not
                if (table.Rows.Count > 0)
                {
                    //Lets go ahead and create the list of employees
                    dt = new DataTable();
                    dt = table;
                }
            }
            return(dt);
        }
Esempio n. 24
0
        public List <BooksMaster> GetBooksMasterList()
        {
            List <BooksMaster> list = null;

            string commandText = OleDBHelper.GetQueryText("BooksMaster_SelectAll", QueryType.Views);


            using (DataTable table = OleDBHelper.ExecuteSelectCommand(commandText, CommandType.Text))
            {
                //check if any record exist or not
                if (table.Rows.Count > 0)
                {
                    //Lets go ahead and create the list of employees
                    list = new List <BooksMaster>();

                    //Now lets populate the employee details into the list of employees
                    foreach (DataRow row in table.Rows)
                    {
                        BooksMaster obj = new BooksMaster();

                        obj.BookID      = Convert.ToString(row["BookID"]);
                        obj.ISBN        = Convert.ToString(row["ISBN"]);
                        obj.Title       = Convert.ToString(row["Title"]);
                        obj.Subject     = Convert.ToString(row["Subject"]);
                        obj.Author      = Convert.ToString(row["Author"]);
                        obj.Publication = Convert.ToString(row["Publication"]);
                        obj.EditionNo   = Convert.ToInt32(row["EditionNo"]);
                        obj.EditionYear = Convert.ToInt32(row["EditionYear"]);
                        obj.Price       = Convert.ToInt32(row["Price"]);

                        list.Add(obj);
                    }
                }
            }

            return(list);
        }
Esempio n. 25
0
        public List <PartyMaster> GetPartyMasterList()
        {
            List <PartyMaster> list = null;

            string commandText = OleDBHelper.GetQueryText("PartyMaster_SelectAll", QueryType.Views);


            using (DataTable table = OleDBHelper.ExecuteSelectCommand(commandText, CommandType.Text))
            {
                //check if any record exist or not
                if (table.Rows.Count > 0)
                {
                    //Lets go ahead and create the list of employees
                    list = new List <PartyMaster>();

                    //Now lets populate the employee details into the list of employees
                    foreach (DataRow row in table.Rows)
                    {
                        PartyMaster obj = new PartyMaster();

                        obj.PartyID      = Convert.ToString(row["PartyID"]);
                        obj.PartyName    = Convert.ToString(row["PartyName"]);
                        obj.PersonName   = Convert.ToString(row["PersonName"]);
                        obj.Address      = Convert.ToString(row["Address"]);
                        obj.ContactNo    = Convert.ToString(row["ContactNo"]);
                        obj.Mobile       = Convert.ToString(row["Mobile"]);
                        obj.EamilAddress = Convert.ToString(row["EamilAddress"]);
                        obj.Remarks      = Convert.ToString(row["Remarks"]);

                        list.Add(obj);
                    }
                }
            }

            return(list);
        }
        //DataTable
        public DataTable GetReportTransactionIn(string transactionID)
        {
            DataTable dt = null;

            string commandText = OleDBHelper.GetQueryText("rptTransactionIn", QueryType.Procedures);

            OleDbParameter[] parameters = new OleDbParameter[]
            {
                new OleDbParameter("@TransactionID", transactionID)
            };

            using (DataTable table = OleDBHelper.ExecuteParamerizedSelectCommand(commandText, CommandType.Text, parameters))
            {
                //check if any record exist or not
                if (table.Rows.Count > 0)
                {
                    //Lets go ahead and create the list of employees
                    dt = new DataTable();

                    dt = table;
                }
            }
            return(dt);
        }