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); }
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 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); }
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); }
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); }
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); }