예제 #1
0
        public DataSet SelectAll(Gaurantee gaurantee)
        {
            Database db = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand dbCommand = db.GetStoredProcCommand("usp_GuaranteeSelectAll");
            db.AddInParameter(dbCommand, "@CompanyId", DbType.Int32, gaurantee.CompanyId);

            return db.ExecuteDataSet(dbCommand);
        }
        public DataSet SelectAll(Gaurantee gaurantee)
        {
            Database  db        = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand dbCommand = db.GetStoredProcCommand("usp_GuaranteeSelectAll");

            db.AddInParameter(dbCommand, "@CompanyId", DbType.Int32, gaurantee.CompanyId);

            return(db.ExecuteDataSet(dbCommand));
        }
예제 #3
0
        public bool Delete(Gaurantee gaurantee)
        {
            Database db = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand command = db.GetStoredProcCommand("usp_GuaranteeDelete");

            db.AddInParameter(command, "@GuaranteeId", DbType.Int32, gaurantee.GuaranteeId);

            db.ExecuteNonQuery(command);

            return true;
        }
        public bool Delete(Gaurantee gaurantee)
        {
            Database  db      = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand command = db.GetStoredProcCommand("usp_GuaranteeDelete");

            db.AddInParameter(command, "@GuaranteeId", DbType.Int32, gaurantee.GuaranteeId);

            db.ExecuteNonQuery(command);

            return(true);
        }
예제 #5
0
        public bool Insert(Gaurantee gaurantee)
        {
            Database db = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand command = db.GetStoredProcCommand("usp_GuaranteeInsert");

            db.AddInParameter(command, "@CompanyId", DbType.Int32, gaurantee.CompanyId);
            db.AddInParameter(command, "@GuaranteeName", DbType.String, gaurantee.GuaranteeName);
            db.AddInParameter(command, "@GuaranteeDescription", DbType.String, gaurantee.GuaranteeDescription);
            db.AddInParameter(command, "@CreatedBy", DbType.Int32, gaurantee.CreatedBy);
            db.AddInParameter(command, "@CreatedDate", DbType.DateTime, gaurantee.CreatedDate);

            db.ExecuteNonQuery(command);

            return true;
        }
        public bool Insert(Gaurantee gaurantee)
        {
            Database  db      = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand command = db.GetStoredProcCommand("usp_GuaranteeInsert");

            db.AddInParameter(command, "@CompanyId", DbType.Int32, gaurantee.CompanyId);
            db.AddInParameter(command, "@GuaranteeName", DbType.String, gaurantee.GuaranteeName);
            db.AddInParameter(command, "@GuaranteeDescription", DbType.String, gaurantee.GuaranteeDescription);
            db.AddInParameter(command, "@CreatedBy", DbType.Int32, gaurantee.CreatedBy);
            db.AddInParameter(command, "@CreatedDate", DbType.DateTime, gaurantee.CreatedDate);

            db.ExecuteNonQuery(command);

            return(true);
        }