public static int DeletetblExpenses(DbTransaction tran, object expenseId) { int retVal = -1; Database db = DatabaseFactory.CreateDatabase(); DbCommand cmd = db.GetStoredProcCommand("proc_DeletetblExpenses"); db.AddInParameter(cmd, "@expenseId", DbType.Double, expenseId); retVal = DataLayerBase.ExecuteNonQuery(db, tran, cmd); return(retVal); }
public static int UpdatetblSupply(DbTransaction tran, DateTime createdDate, DateTime modifiedDate, string supplyDescription, double supplyId, string supplyName) { int retVal = -1; Database db = DatabaseFactory.CreateDatabase(); DbCommand cmd = db.GetStoredProcCommand("proc_UpdatetblSupply"); db.AddInParameter(cmd, "@createdDate", DbType.DateTime, createdDate); db.AddInParameter(cmd, "@modifiedDate", DbType.DateTime, modifiedDate); db.AddInParameter(cmd, "@supplyDescription", DbType.String, supplyDescription); db.AddInParameter(cmd, "@supplyId", DbType.Double, supplyId); db.AddInParameter(cmd, "@supplyName", DbType.String, supplyName); retVal = DataLayerBase.ExecuteNonQuery(db, tran, cmd); return(retVal); }
public static int InserttblExpenses(DbTransaction tran, DateTime createdDate, string expenseAmount, string expenseDescription, double expenseId, string expenseName, DateTime modifiedDate) { int retVal = -1; Database db = DatabaseFactory.CreateDatabase(); DbCommand cmd = db.GetStoredProcCommand("proc_InserttblExpenses"); db.AddInParameter(cmd, "@createdDate", DbType.DateTime, createdDate); db.AddInParameter(cmd, "@expenseAmount", DbType.String, expenseAmount); db.AddInParameter(cmd, "@expenseDescription", DbType.String, expenseDescription); db.AddInParameter(cmd, "@expenseId", DbType.Double, expenseId); db.AddInParameter(cmd, "@expenseName", DbType.String, expenseName); db.AddInParameter(cmd, "@modifiedDate", DbType.DateTime, modifiedDate); retVal = DataLayerBase.ExecuteNonQuery(db, tran, cmd); return(retVal); }
public static int InserttblProducts(DbTransaction tran, DateTime createdDate, DateTime modifiedDate, string productCode, string productDescription, double productId, string productName) { int retVal = -1; Database db = DatabaseFactory.CreateDatabase(); DbCommand cmd = db.GetStoredProcCommand("proc_InserttblProducts"); db.AddInParameter(cmd, "@createdDate", DbType.DateTime, createdDate); db.AddInParameter(cmd, "@modifiedDate", DbType.DateTime, modifiedDate); db.AddInParameter(cmd, "@productCode", DbType.String, productCode); db.AddInParameter(cmd, "@productDescription", DbType.String, productDescription); db.AddInParameter(cmd, "@productId", DbType.Double, productId); db.AddInParameter(cmd, "@productName", DbType.String, productName); retVal = DataLayerBase.ExecuteNonQuery(db, tran, cmd); return(retVal); }
public static int UpdatetblProductSupply(DbTransaction tran, string costPrice, DateTime createdDate, string maxSellingPrice, string minSellingPrice, DateTime modifiedDate, double productId, double productSupplyId, string quantityAtHand, string suppliedQuantity, double supplyId) { int retVal = -1; Database db = DatabaseFactory.CreateDatabase(); DbCommand cmd = db.GetStoredProcCommand("proc_UpdatetblProductSupply"); db.AddInParameter(cmd, "@costPrice", DbType.String, costPrice); db.AddInParameter(cmd, "@createdDate", DbType.DateTime, createdDate); db.AddInParameter(cmd, "@maxSellingPrice", DbType.String, maxSellingPrice); db.AddInParameter(cmd, "@minSellingPrice", DbType.String, minSellingPrice); db.AddInParameter(cmd, "@modifiedDate", DbType.DateTime, modifiedDate); db.AddInParameter(cmd, "@productId", DbType.Double, productId); db.AddInParameter(cmd, "@productSupplyId", DbType.Double, productSupplyId); db.AddInParameter(cmd, "@quantityAtHand", DbType.String, quantityAtHand); db.AddInParameter(cmd, "@suppliedQuantity", DbType.String, suppliedQuantity); db.AddInParameter(cmd, "@supplyId", DbType.Double, supplyId); retVal = DataLayerBase.ExecuteNonQuery(db, tran, cmd); return(retVal); }
public static int UpdatetblSales(DbTransaction tran, string actualSellingPrice, string costPrice, DateTime createdDate, DateTime modifiedDate, string packType, double productId, string profit, string quantity, double saleId, double supplyId) { int retVal = -1; Database db = DatabaseFactory.CreateDatabase(); DbCommand cmd = db.GetStoredProcCommand("proc_UpdatetblSales"); db.AddInParameter(cmd, "@actualSellingPrice", DbType.String, actualSellingPrice); db.AddInParameter(cmd, "@costPrice", DbType.String, costPrice); db.AddInParameter(cmd, "@createdDate", DbType.DateTime, createdDate); db.AddInParameter(cmd, "@modifiedDate", DbType.DateTime, modifiedDate); db.AddInParameter(cmd, "@packType", DbType.String, packType); db.AddInParameter(cmd, "@productId", DbType.Double, productId); db.AddInParameter(cmd, "@profit", DbType.String, profit); db.AddInParameter(cmd, "@quantity", DbType.String, quantity); db.AddInParameter(cmd, "@saleId", DbType.Double, saleId); db.AddInParameter(cmd, "@supplyId", DbType.Double, supplyId); retVal = DataLayerBase.ExecuteNonQuery(db, tran, cmd); return(retVal); }